#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll  mod = 1000000007;
#define pp pair<ll,ll>
typedef long double ld;
const ll long_max = 9223372036854775807;
const ll inf = 1000000000000000;
void pr(ll n) {cout<<(n)<<"\n";}
void pr(string s) {cout<<(s)<<"\n";}
void pr(pair<ll,ll> p){cout<<(p).first<<" "<<(p).second<<"\n";};
void pr(ll a,ll b) {cout<<(a)<<" "<<(b)<<"\n";}
void pr(ll a,ll b,ll c) {cout<<(a)<<" "<<(b)<<" "<<(c)<<"\n";}
void pr(ll a,ll b,ll c,ll d) {cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<"\n";}
void pr(ll a,ll b,ll c,ll d,ll e) {cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<"\n";}
#define nxl   cout<<"\n"
#define pr1(a) cout<<(a)<<"\n"
#define pr2(a,b) cout<<(a)<<" "<<(b)<<"\n"
#define pr3(a,b,c) cout<<(a)<<" "<<(b)<<" "<<(c)<<"\n"
#define pr4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<"\n"
#define pr5(a,b,c,d,e) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<" "<<(e)<<"\n"
#define prv(v) rep(i,v.size()) cout<<(v[i])<<" "; nxl
#define pra(v,n) rep(i,n) cout<<(v[i])<<" "; nxl
#define deb(x) cout << #x << "=" << x << "\n"
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << "\n"
#define prs(n) cout<<(n)<<" "
#define prp(p) cout<<(p).first<<" "<<(p).second<<", "
#define all(x) x.begin(), x.end()
#define fill(x,v_l) memset(x, (v_l), sizeof(x))
#define sld(n)      scanf("%lld", &n)
#define      each(it,s)        for(auto it = s.begin(); it != s.end(); ++it)
#define      eachR(it,s)       for(auto it = s.rbegin(); it != s.rend(); ++it)
#define      sortA(v)          sort(v.begin(), v.end())
#define      sortD(v)          sort(v.begin(), v.end(), revcomp)
#define      sortp(v)          sort(v.begin(), v.end(), comp)
#define      sortfoo(v)        sort(v.begin(), v.end(), foo)
#define      rev(v)            reverse(v.begin(), v.end())
#define      rep(i, n)         for(ll i = 0; i < (n); ++i)
#define      rep1(i,n)         for(ll i=1;i<(n);i++)  
#define      rep2(i,n)         for(ll i=2;i<(n);i++)
#define      repd(i,n)         for(ll i=(n-1);i>=0;i--)
#define      repb(i,n)         for(ll i=1;i<(n-1);i++)
#define      repA(i, a, n)     for(ll i = a; i <= (n); ++i)
#define      repD(i, a, n)     for(ll i = a; i >= (n); --i)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define popb pop_back
#define PI 3.1415926535897932384626
void decimal(int);
ll max(ll, ll);
ll multi(ll, ll);
ll add(ll, ll);
ll subtract(ll,ll);
ll modpower(ll, ll);
ll gcd(ll, ll );
ll modinv(ll,ll);
ll power(ll,ll);
ll divi(ll,ll);
void subsetsUtil(vector<ll>&, vector<vector<ll> >&, vector<ll>&, ll);
vector<vector<ll> > subsets(vector<ll>& );
ll ncrmod(ll, ll, ll);
ll ncr(ll , ll );
ll npr(ll , ll );  
ll nprmod(ll , ll );
vector<string> permutations(string);
void makeCombiUtil(vector<vector<ll> >&, vector<ll>&, ll, ll, ll);
vector<vector<ll> > makeCombi(ll, ll);
void printSubSeqRec(string, ll, ll, string);
void printSubSeq(string);
bool comp(pp a, pp b) {   if(a.first == b.first) return a.second<b.second; else return a.first<b.first; }
ll numdigit(ll n){ ll cnt = 0; while(n>0){n/=10; cnt++;} return cnt;}
pair<ld,ll> powerldpair(ld,ll);
bool revcomp(ll a,ll b){ return a>b;}


void pre()
{

}

// see if no. of test cases is taken as input or not
void solve()
{
	ll x;
	cin>>x;
	ll p = log2(x);
	
		ll q = x/2;
	ll z = sqrt(q);

	if(z>0 && 2*z*z == x) pr("YES");
	else {
		q = x/4;
		z = sqrt(q);
		if(z>0 && 4*z*z == x) pr("YES");
		else pr("NO");
	}
	

}


int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    
    ll t = 1;
    cin>>t;
    
    pre();
    while(t--)
    {	
    	solve();
    	
    }
    return 0; 
}







































































































ll max(ll x,ll y){
    if(x>y) return x; return y;
}

ll add(ll x,ll y){
    return ((x%mod) + (y%mod) + mod)%mod; }

ll multi(ll x,ll y){
    return ((x%mod) * (y%mod))%mod; }

ll subtract(ll x,ll y){
    return ((x%mod) - (y%mod) + mod)%mod; }
ll divi(ll a , ll b)
{
    return (a%mod * power(b,mod-2)%mod)%mod;
}

ll modpower(ll x, ll y)
{   ll p = mod; ll res = 1;
    x = x % p;
    while (y > 0){
        if (y & 1) res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;}
    return res;}

ll power(ll a , ll b)
{ ll prod = 1;
    while(b)
    {
        if(b&1)
        {
            prod = (prod * a);
        }
        a = (a*a);
        b >>= 1;
    }
    return prod;
}
pair<ld,ll> powerldpair(ld a , ll b)
{   ld prod = 1; ll powten = 0; ll powtemp = 0;
    while(b)
    {  if(b&1)
    {
        prod = (prod * a);
        powten += powtemp;
        while(prod>=10)
        {
            prod/=10;
            powten++;
        }
    }
        a = (a*a);
        powtemp*=2;
        while(a>=10)
        {
            a/=10;
            powtemp++;
        }
        b >>= 1;
    }
    return mp(prod,powten);
}
ll gcd(ll a, ll b){
    if(b>a) swap(a,b);
    if (b == 0) return a; else return gcd(b, a % b); }

void subsetsUtil(vector<ll>& A, vector<vector<ll> >& res, vector<ll>& subset, ll index){
    res.push_back(subset);
    for (ll i = index; i < A.size(); i++) {
        subset.push_back(A[i]); subsetsUtil(A, res, subset, i + 1); subset.pop_back();}
    return;}
vector<vector<ll> > subsets(vector<ll>& A)
{    vector<ll> subset; vector<vector<ll> > res; ll index = 0;
    subsetsUtil(A, res, subset, index);
    return res;}

void decimal(int n){
    cout<<fixed;
    cout<<setprecision(n); }

ll modinv(ll n, ll p)
{ return modpower(n, p-2);}

ll ncrmod(ll n, ll r, ll p)
{if (r==0) return 1;
	if(n<r) return 0;
    ll fac[n+1]; fac[0] = 1;
    for (ll i=1 ; i<=n; i++) fac[i] = fac[i-1]*i%p;
    return (fac[n]* modinv(fac[r], p) % p * modinv(fac[n-r], p) % p) % p;}

ll ncr(ll n, ll k)
{ ll res = 1;
	if(n<k) return 0;
    if ( k > n - k ) k = n - k;
    for (ll i = 0; i < k; ++i)
    { res *= (n - i); res /= (i + 1); }
    return res; }

ll npr(ll n, ll k)
{ ll P = 1; for (ll i = 0; i < k; i++) P *= (n-i) ; return P; }

ll nprmod(ll n, ll k)
{ ll P = 1; for (ll i = 0; i < k; i++) P = multi(P,n-i) ; return P%mod; }

vector<string> permutations(string str)
{ vector<string> vec; sort(str.begin(), str.end());
    do { vec.pb(str); } while (next_permutation(str.begin(), str.end()));
    return vec; }


void makeCombiUtil(vector<vector<ll> >& ans, vector<ll>& tmp, ll n, ll left, ll k)
{ if (k == 0) {ans.push_back(tmp); return; }
    for (ll i = left; i <= n; ++i)
    { tmp.push_back(i);makeCombiUtil(ans, tmp, n, i + 1, k - 1); tmp.pop_back();}
}

vector<vector<ll> > makeCombi(ll n, ll k)
{   vector<vector<ll> > ans; vector<ll> tmp; makeCombiUtil(ans, tmp, n, 1, k); return ans; }

void printSubSeqRec(string str, ll n, ll index = -1, string curr = "")
{ if (index == n) return;
    cout << curr << "\n";
    for (ll i = index + 1; i < n; i++) { curr += str[i]; printSubSeqRec(str, n, i, curr); curr = curr.erase(curr.size() - 1); }
    return; }

void printSubSeq(string str)
{printSubSeqRec(str, str.size());}


class SegT {
 	private:
		vector <ll> seg;
		vector <ll> lazy;
		ll n;
	 
		void push(ll p) {
			ll ch1 = 2*p+1;
			ll ch2 = 2*p+2;

			lazy[ch1] += lazy[p];
			lazy[ch2] += lazy[p];
			seg[ch1] += lazy[p];
			seg[ch2] += lazy[p];
			lazy[p] = 0;
		}
	 
		ll operation(ll x, ll y) {
			return max(x, y);
		}
	 
		void build(ll a[], ll s, ll l, ll p) {
			if(s == l) seg[p] = a[s];
			else {
				ll m = (s+l)/2;
				ll ch1 = 2*p+1;
				ll ch2 = 2*p+2;
				build(a,s,m,ch1);
				build(a,m+1,l,ch2);
				seg[p] = operation(seg[ch1], seg[ch2]);
			}
		}
	 
		void update(ll a, ll b, ll s, ll l, ll p, ll val) {
			if(a > b) return;
			if(a == s && b == l) {
				seg[p] += val;
				lazy[p] += val;
			} else {
				push(p);
				ll m = (s+l)/2;
				ll ch1 = 2*p+1;
				ll ch2 = 2*p+2;
				update(a, min(b, m), s, m, ch1, val);
				update(max(a, m+1), b, m+1, l, ch2, val);
				seg[p] = operation(seg[ch1], seg[ch2]);
			}
		}
	 
		ll query(ll a, ll b, ll s, ll l, ll p) {
			if(a <= s && l <= b) return seg[p];
			if(a > l || s > b) return INT_MIN;
			push(p);
			ll m = (s+l)/2;
			ll ch1 = 2*p+1;
			ll ch2 = 2*p+2;
			ll x = query(a,b,s,m,ch1);
			ll y = query(a,b,m+1,l,ch2);
			return operation(x, y);
		} 
	public:
	 
		SegT(ll m) {
			n = m;
			seg.resize(4*n);
			lazy.resize(4*n);
			rep(i,seg.size()){ seg[i] = 0; lazy[i] = 0;}
		}
	 
		void build(ll a[]) {
			return build(a, 0, n-1, 0);
		}
	 
		void update(ll a, ll b, ll val) {
			return update(a, b, 0, n-1, 0, val);
		}
	 
		void update(ll i, ll val) {
			return update(i, i, 0, n-1, 0, val);
		}
	 
		ll query(ll l, ll r) {
			return query(l, r, 0, n-1, 0); 
		}
};

class SegTpair {
 
	private:
		vector <pair<ll,ll>> seg;
		vector <pair<ll,ll>> lazy;
		ll n;
	 
		void push(ll p) {
			ll ch1 = 2*p+1;
			ll ch2 = 2*p+2;
	 
			// This is for range add
			lazy[ch1].first += lazy[p].first;
			lazy[ch1].second += lazy[p].second;
			lazy[ch2].first += lazy[p].first;
			lazy[ch2].second += lazy[p].second;
			seg[ch1].first += lazy[p].first;
			seg[ch1].second += lazy[p].second;
			seg[ch2].first += lazy[p].first;
			seg[ch2].second += lazy[p].second;
			lazy[p] = {0,0};
		}
	 
		pair<ll,ll> operation(pair<ll,ll> x, pair<ll,ll> y) {
			
			if(x.first>y.first)
				return x;
			return y;
		}
	 
		void build(pair<ll,ll> *a, ll s, ll l, ll p) {
			if(s == l) seg[p] = a[s];
			else {
				ll m = (s+l)/2;
				ll ch1 = 2*p+1;
				ll ch2 = 2*p+2;
				build(a,s,m,ch1);
				build(a,m+1,l,ch2);
				seg[p] = operation(seg[ch1], seg[ch2]);
			}
		}
	 
		void update(ll a, ll b, ll s, ll l, ll p, pair<ll,ll> val) {
			if(a > b) return;
			if(a == s && b == l) {
				seg[p].first += val.first;
				seg[p].second += val.second;
				lazy[p].first += val.first;
				lazy[p].second += val.second;
			} else {
				push(p);
				ll m = (s+l)/2;
				ll ch1 = 2*p+1;
				ll ch2 = 2*p+2;
				update(a, min(b, m), s, m, ch1, val);
				update(max(a, m+1), b, m+1, l, ch2, val);
				seg[p] = operation(seg[ch1], seg[ch2]);
			}
		}
	 
		pair<ll,ll> query(ll a, ll b, ll s, ll l, ll p) {
			if(a <= s && l <= b) return seg[p];
			if(a > l || s > b) return {-inf,-inf};
			push(p);
			ll m = (s+l)/2;
			ll ch1 = 2*p+1;
			ll ch2 = 2*p+2;
			pair<ll,ll> x = query(a,b,s,m,ch1);
			pair<ll,ll> y = query(a,b,m+1,l,ch2);

			return operation(x, y);
		} 
	public:
	 
		SegTpair(ll m) {
			n = m;
			seg.resize(4*n);
			lazy.resize(4*n);
			for(ll i = 0;i<seg.size();++i)
			{
				seg[i] = make_pair(0,0);
				lazy[i] = make_pair(0,0);
			}
		}
	 
		void build(pair<ll,ll> *a) {
			return build(a, 0, n-1, 0);
		}
	 
		void update(ll a, ll b, pair<ll,ll> val) {
			return update(a, b, 0, n-1, 0, val);
		}
	 
		void update(ll i, pair<ll,ll> val) {
			return update(i, i, 0, n-1, 0, val);
		}
	 
		pair<ll,ll> query(ll l, ll r) {
			return query(l, r, 0, n-1, 0); 
		}
 
	
};