#define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; int main(){ ll N; cin >> N; map mp; for(ll i = 1; i*i <= N; i++){ if(N%i == 0){ mp[N/i]++; mp[i]++; } } for(auto p: mp){ if(p.first >= 3){ cout << p.first << endl; return 0; } } }