#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

bool check(ll n) {
    ll l = 0, r = n;
    while (r - l > 1) {
        ll m = (l + r) / 2;
        if (m * m == n) return true;
        if (m * m < n) l = m; else r = m;
    }
    if (l * l == n || r * r == n) return true;
    return false;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int t;
    cin >> t;
    for (int tt = 0; tt < t; tt++) {
        int n;
        cin >> n;
        if ((n % 2 == 0 && check(n / 2)) || (n % 4 == 0 && check(n / 4))) {
            cout << "YES\n";
        } else {
            cout << "NO\n";
        }
    }
    return 0;
}
