#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; int B[11]={2,3,5,7,11,13,17,19,23,29,31}; int f(ll x){ int res=1; rep(i,11){ int cnt=0; ll a=x; while(a%B[i]==0){ cnt++; a/=B[i]; } res*=cnt+1; } return res; } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int t; cin>>t; while(t--){ ll x; cin>>x; int tmp=2*f(x); for(int i=2;i<=31;i++){ if(tmp==f(i*x)){ cout<