#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define int long long #define uint unsigned long long const int mod=1e9+7; const int inf=mod*mod; const double eps=1e-9; int pri[11]={2,3,5,7,11,13,17,19,23,29,31}; signed main(){ int t,x; cin>>t; while(cin>>x){ int y=inf; for(int i=0;i<=10;i++){ int p=pri[i],xx=x,e=0; while(xx%p==0){ xx/=p; e++; } int tmp=1; for(int i=0;i<=e;i++) tmp*=p; if(tmp<=(y-1)/x) y=tmp*x; } cout<