#include #include #include #include #include #include #include #define ll __int64 #define ull unsigned long long #define INF 1e+18 #define maxn 500500 using namespace std; ll n, m; bool a[maxn]; int prime[maxn / 5]; int cnt; void creatprime() { int i, j; a[0] = 1; a[1] = 1; for (i = 2; i*i= ans) break; } printf("%I64d\n", ans); } int main() { creatprime(); int t; scanf("%d", &t); while (t--) { getData(); solve(); } return 0; }