#include using namespace std; #define rep(i,a,b) for(int i=a;i> N; rep(i, 3, sqrt(N)+1) { if (N % (ll)i == 0) { cout << i << endl; return 0; } } cout << N << endl; }