#include using namespace std; typedef long long ll; typedef vector vi; typedef vector vl; typedef complex P; typedef pair pii; #define REP(i,n) for(ll i=0;i> n; if(n<=100){ FOR(i,3,n){ if(n%i==0){ cout << i << endl; return 0; } } }else{ for(ll i=3;i*i<=n;++i){ if(n%i==0){ cout << i << endl; return 0; } } } cout << n << endl; return 0; }