/*
 * author: AlexXan312
 * good luck
 */
#include <iostream>
#include <fstream>
#include <functional>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <stack>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <list>
#include <bitset>
#include <cmath>
#include <ctime>
#include <cassert>
#include <random>
#include <chrono>

using namespace std;
using ll = long long;
using ld = long double;
using str = string;
using pll = pair<ll, ll>;

#define mp make_pair
#define pb push_back
#define fi first;
#define se second;
#define PI 3.1415926535897932384626


const ll MOD = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }



void solve() {
    ll n;
    cin >> n;
    ll el = n / 2;
    if((n % 2 == 0) && ((ll)sqrt(el) * (ll)sqrt(el)) == el) {
        cout << "YES" << '\n';
        return;
    }
    el = n /4;
    if((n % 4 == 0) && ((ll)sqrt(el) * (ll)sqrt(el)) == el) {
        cout << "YES" << '\n';
        return;
    }
    cout << "NO" << '\n';
    return;

}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    ll t;
    cin >> t;
    while (t--) {
        solve();
    }
}