#include <bits/stdc++.h>

using namespace std;

typedef unsigned long long ll;
typedef long double ld;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvl;
typedef vector<ll, vector<ll>> vll;
#define ln "\n"
#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())

void solve()
{
  ll n;
  cin >> n;

  if (n % 2 != 0)
  {
    cout << "NO" << ln;
    return;
  }

  ll j = n;

  while (j % 2 == 0)
  {
    j = j / 2;
  }

  if (j == 1)
  {
    cout << "YES" << ln;
    return;
  }

  ll sq = sqrt(j);
  if (sq * sq == j)
  {
    cout << "YES" << ln;
    return;
  }

  cout << "NO" << ln;
}

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

  int test;
  cin >> test;
  for (int i = 1; i <= test; i++)
    solve();

  return 0;
}