#include #include #include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int t; cin>>t; const int mx = 3e5; vector cnt(mx+1,0); vector use; for(int i = 2;i<=mx;i++){ if(cnt[i]) continue; use.push_back(i); for(int j = i;j<=mx;j+=i) cnt[j] = 1; } while(t--){ ll a; cin>>a; ll ans = a * 100; ll x = a; for(int i = 2;i<=100;i++){ vector facs; int now = i; for(int j = 2;j*j<=i;j++) if(now%j==0){ while(now%j==0) now /= j; facs.push_back(j); } if(now!=1) facs.push_back(now); ll p = 1; ll q = 1; for(auto&e:facs) { int cnt = 0; ll now = x; while(now%e==0){ now /= e; cnt++; } int c = 0; now = i; while(now%e==0){ now /= e; c++; } p *= (cnt+c+1); q *= cnt + 1; } if(p%q==0&&p/q==2){ ans = x * i; break; } } cout<