#include<iostream>#include<vector>#include<string>#include<cmath>#include<algorithm>#include<queue>#include<cstdio>#include<cctype>#include<unordered_map>#include<map>usingnamespace std;intmain(){int n, x;
cin>>n;while(n--){
cin>>x;int sq =sqrt(x);
vector<int> vt;//存所有因子 for(int i =1; i <= sq; i++){if(x%i==0){
vt.push_back(i);
vt.push_back(x/i);}}if(sq*sq == x) vt.pop_back();int tag =0;int m = vt.size();for(int a =0; a < m-3&&!tag; a++){for(int b = a+1; b < m-2&&!tag; b++){for(int c = b+1; c < m-1&&!tag; c++){for(int d = c+1; d < m; d++){int sum = vt[a]+vt[b]+vt[c]+vt[d];if(sum%x==0){
tag =1;break;}}}}}if(tag) cout<<"Yes"<<endl;else cout<<"No"<<endl;}return0;}