#include<bits/stdc++.h>
using namespace std;
int main() {
int a,c=0;
long long b;
cin>>a;
for(int i=1;i<=a;i++){
cin>>b;
for(int j=1;j<=a;j++){
for(int k=1;k<=a;k++){
if(k*k+j*j==b){
c++;}}}
if(c>=1){
cout<<"Yes"<<endl;}
else{
cout<<"No"<<endl;}
c=0;}
return 0;
}