//__BISMILLAH_HIR_RAHMANIR_RAHIM____//
//__BY THE NAME OF ALLAH, THE MOST BENEFICENT, THE MERCIFUL__//
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long
#define pb push_back
#define mp make_pair
#define loop(i,x,n) for(long long i =(x);i<(n);i++)
#define pool(i,x,n) for(long long i = (x);i>=n;i--)
#define FAST ios::sync_with_stdio(false);cin.tie(0);

//_____________________________________________________________________
void input()
{
        #ifndef Sayem_Ahmed
        freopen("input.txt","r",stdin);
        freopen("dekho.txt","w",stdout);
        #endif
}
//_____________________________________________________________________


int main()
{
    FAST
    //input();
    int t;
    cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;

        double x = (1.0*n/2);
        ll x1 = n/2;
        double y = sqrt(x1);
        ll y1 = sqrt(x1);


        if(x==x1 && y==y1) cout<<"YES"<<endl;
        else 
        {
            double p = (1.0*n/4);
            ll p1 = n/4;
            double q = sqrt(p1);
            ll q1 = sqrt(p1);

            //cout<<p<<" "<<p1<<endl<<q<<" "<<q1<<endl;

            if(q==q1 && p==p1) cout<<"YES"<<endl;
            else cout<<"NO"<<endl;
        }


    }
    


    return 0;
          
} 