#include <bits/stdc++.h>
#define M 1000000007
#define fio                           \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);
#define d(x) cout << #x << " " << x << "\n";
#define min(x1, x2) (x1 > x2 ? x2 : x1)
#define max(x1, x2) (x1 < x2 ? x2 : x1)
#define min3(x1, x2, x3) (x3 > min(x1, x2) ? min(x2, x1) : x3)
#define max3(x1, x2, x3) (x3 < max(x1, x2) ? max(x1, x2) : x3)
#define ll long long int
#define ul unsigned long long int
#define p pair<ll, ll>
#define ld long double
#define dv(v)                            \
    cerr << #v << "  ";                  \
    for (int i = 0; i < (v).size(); i++) \
        cerr << v[i] << " ";             \
    cerr << "\n";
#define inf INT_MAX
#define mp(x, y) make_pair(x, y)
using namespace std;

bool isq(ld n)
{
    if (sqrt(n)==ceil((ld)sqrt(n)) && ceil((ld)sqrt(n)) == floor((ld)sqrt(n)) && sqrt(n) * sqrt(n) == n)
    {
        return 1;
    }
    return 0;
}

int main()
{
    fio;
    ll t, n, x, y, z, k;
    cin >> t;
    while (t--)
    {
        cin >> n;
        if ((n % 2==0 && isq(n / 2)) || (n % 4==0 && isq(n / 4)))
        {
            cout << "YES\n";
        }
        else
        {
            cout << "NO\n";
        }
    }
    return 0;
}