#include <bits/stdc++.h>
using namespace std;
#define ll long long

int sqrrt(int n)
{
    return sqrt(n);
}
int is_perfect_sq(int n)
{
    return (sqrrt(n) * sqrrt(n) == n);
}

int main()
{
    int k;
    cin >> k;
    int n;
    

    for (int i = 0; i < k; i++)
    {
        cin >> n ;
        switch (n % 4)
        {
        case 0:
            if (is_perfect_sq(n / 4) || is_perfect_sq(n / 2))
            {
                cout << "YES" << endl;
                break;
            }
        case 2:
            if (is_perfect_sq(n/2))
            {
                cout << "YES" << endl;
                break;
            }
        default:
            cout << "NO" << endl;
            break;
        }
    }

    return 0;
}