#include long solve(long x) { constexpr int arr[] = {2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32}; for (const auto &a: arr) { if (x % a != 0) { return x * a; } } } int main() { int T; std::cin >> T; for (int i = 0; i < T; ++i) { long x; std::cin >> x; std::cout << solve(x) << std::endl; } }