#include <iostream>
using namespace std;
typedef long long ll;
bool is(ll b){
    ll l=1,r=1e9;
    while(l<=r){
        ll mid=l+(r-l)/2;
        if(mid*mid==b)return true;
        else if(mid*mid<b)l=mid+1;
        else r=mid-1;
    }
    return false;
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;
    cin>>t;
    while(t--){
        ll b;
        cin>>b;
        if(is(b))cout<<"YES\n";
        else cout<<"NO\n";
    }
    return 0;
}
// 64 位输出请用 printf("%lld")