#include #include #include using namespace std; int main() { long long int n; cin >> n; for (long long int i = 2; i*i <= n; i++) { if (n%i == 0) { cout << i << endl; return 0; } } cout << n << endl; return 0; }