#include using namespace std; int main(){ long long N; cin >> N; map table; for(long long i=2;i*i<=N;i++){ while(N%i==0){ N/=i; table[i]++; } table[N]++; } for(auto s:table){ if(s.first==2||s.first==1) continue; else{ cout << s.first << endl; return 0; } } }