#include using namespace std; int main() { int T; cin >> T; while (T--) { long long X; cin >> X; vectorprime = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}; long long ans = 1001001001001001001; for(int i = 0; i < prime.size(); i++) { int cnt = 0; long long Y = X; while (Y%prime[i] == 0) { cnt++; Y /= prime[i]; } ans = min(ans,X*prime[i]*(cnt+1)); } cout << ans << endl; } }