/**
-------------> harshit_1010      
**/
///   TEMPLATE STARTED   /////
                    //        Neeche to dekho            //
///HEADER FILES///
 
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cctype>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <complex>
#include <iomanip>
#include <utility>
#include <bitset>
#include <list>
#include <assert.h>
#include <numeric>
#include <fstream>
using namespace std;
 
//#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;
 
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
 
//USAGE s.order_of_key(val) its expected position (int)in set
// s.find_by_order(index); 0 based
//find_by_order returns an( iterator )to
//the element at a given position 
 
///DEFINES///
#define ff first
#define ss second
#define ull unsigned long long int 
#define ll long long int
#define type(x) typeid(x).name()
#define vi vector<int>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vll vector<ll>
#define nmvi(v,n,m) vector<vector<int>> v(n,vector<int>(m)); _fr(i,n) _fr(j,m) v[i][j] = 0;
#define MOD ((ll)(1e9+7))
#define endl "\n"
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define FASTIO ios::sync_with_stdio(0); cin.tie(0)
#define check(x) cout<<"CHECK = "<<#x<<"\n";
#define MID(a,b) (a+(b-a)/2)
#define mine(b) *min_element(all(b))
#define maxe(b) *max_element(all(b))
#define mini(b) min_element(all(b))-b.begin()
#define maxi(b) max_element(all(b))-b.begin()
#define sz(a) int((a).size())
#define present(c, element) (c.find(element) != c.end())
#define _fr(i,n) for(int i=0;i<n;i++) // for_loop
#define _frr(i,a,b) for(int i=a;i<=b;i++)  // for_range
#define _rf(i,b,a) for(int i=b;i>=a;i--)  // reverse for_range
#define write(a) for(auto x: a) cout << x << ' ';cout << endl;
#define fail(a) {cout<<#a<<endl;return;}
#define pass(a) {cout<<#a<<endl;return;}
#define output(a) cout << a << endl;
#define next cout<<endl;
#define rnext return"\n";
#define rsort(a,n) sort(a,a+n,greater<ll>());
#define swap(a,b)  a=a+b;b=a-b;a-=b;
#define pb push_back
#define pop pop_back
#define v2l(name,n,m)  vector<vector<ll>> name( n , vector<ll> (m,0)); 
#define cinv(v,n) for(i=0;i<n;i++){cin>>k;v.pb(k);}
#define mull multiset<ll>
#define sll set<ll>
#define full(p) p.begin(),p.end()
/// CONSTANTS ///
const int INF = (int) INT_MAX;
const long long INF64 = (long long) 1e18;
const long double eps = 1e-9;
const long double pi = 3.14159265358979323846;
double PHI = 1.6180339; 
 
///TEMPLATES///
template<class T1>void deb(T1 e)
{
    cout <<"-->"<< e << endl;
}
template<class T1, class T2> void deb(T1 e1, T2 e2)
{
    cout <<"-->"<< e1 << " " << e2 << endl;
}
template<class T1, class T2, class T3> void deb(T1 e1, T2 e2, T3 e3)
{
    cout <<"-->"<< e1 << " " << e2 << " " << e3 << endl;
}
template<class T1, class T2, class T3, class T4> void deb(T1 e1, T2 e2, T3 e3, T4 e4)
{
    cout <<"-->"<< e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
 
// Errichto debugger
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
 //debug & operator << (debug & dd, P p) { dd << "(" << p.x << ", " << p.y << ")"; return dd; }
// Errichto debugger ends
 
void read(vector<int> &v) {
	int N = (int)v.size();
	for(int i=0; i<N; i++) {
		cin >> v[i];	
	}
}
 
// UNCOMMENT FOR GRAPHS
//const int d4i[4]={-1, 0, 1, 0}, d4j[4]={0, 1, 0, -1};
//const int d8i[8]={-1, -1, 0, 1, 1, 1, 0, -1}, d8j[8]={0, 1, 1, 1, 0, -1, -1, -1};
 
//bool e(int i, int j) {
	//return i>=0 && j>=0 && i<n && j<m;
//}
 
///  TEMPLATE   OVER   ///
 
///----------ANSWER -------------------------------///
#define MAX 1000000
// bool prime[1000001]; 
// vector<ll> vvv;
// void SOE() 
// { 
// 	memset(prime, true, sizeof(prime)); 
 
// 	prime[1] = false; 
 
// 	for (ll p = 2; p * p <= MAX; p++) { 
 
// 		// If prime[p] is not changed, then it is a prime 
// 		if (prime[p] == true) { 
// 			//vvv.push_back(p);
// 			//cout<<p<<endl;
// 			// Set all multiples of p to non-prime 
// 			for (ll i = p * p; i <= MAX; i += p) 
// 				prime[i] = false; 
// 		} 
// 	} 
// 	for(ll i=1;i<=1000001;i++)
// 			if(prime[i])vvv.push_back(i);
		
// } 
  
// bool isprime(ll n) {
//     if (n == 1)return false;
//     ll i = 2;
//     while (i*i <= n){
//      if (n % i == 0)  return false;
//         i += 1;
//     }
//     return true;
// }
//  ll fact(ll n) 
// {  
//     return (n==1 || n==0) ? 1: n * fact(n - 1);  
// } 
// vll vp;
//   ll inorder(vll a,ll l,ll r)
//   {
//       if(l<=r)
//       {
//         inorder(a,l*2,r);
//         //cout<<a[l-1]<<" ";
//           vp.push_back(a[l-1]);
//           inorder(a,l*2+1,r);
//       }
//       return 0;
//   }
 bool isPowerOfTwo (ll x)
{
    /* First x in the below expression is for the case when x is 0 */
    return x && (!(x&(x-1)));
}
void Answer()
{
   ll n,i,j,k,l,x;
  l=0;
   cin>>n;
   for(i=1;i*i*2<=n;i++);
   	i--;
   for(j=1;j*j*4<=n;j++);
   	j--;
   if(j*j*4==n || i*i*2==n)cout<<"YES";

  // if(isPowerOfTwo(n) && n!=1)cout<<"YES";
   else
  	cout<<"NO";
     next;
	
	}
	
	
	int main() {
 
    FASTIO;
    ll t = 1;
  
   cin>>t;
    
    while(t--)
    {
    	//cout<<Answer()<<endl;
       Answer();
    	}
    return 0;
}