#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
for(int i = 1;i <= n;i++){
int x,y,f = 0;
cin >> x;
for(int j = 1;j < x;j++){
y = x - j * j;
int s = sqrt(x);
if(s * s == y) f = 1;
}
if(f) cout << "Yes" << "\n";
else cout << "No" << "\n";
}
return 0;
}