#include <bits/stdc++.h>
#include <cmath>
using namespace std;
using ll = long long;
const int OvO = 0;

bool find(ll x)
{
    ll l=0l,r=1e9l;

    while(l+1!=r)
    {
        ll mid=(l+r)>>1;
        if(mid*mid>=x)
        {
            r=mid;
        }
        else
        {
            l=mid;
        }
    }

    if(r*r==x)
    {
        return true;
    }

    return false;
}
int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int t;
    cin>>t;
    while(t--)
    {
        ll x;
        cin>>x;
        if(find(x))
        {
            cout<<"YES";
        }
        else{
            cout<<"NO";
        }

        cout<<'\n';
    }
    return OvO;
}