/* -*- coding: utf-8 -*- * * 312.cc: No.312 置換処理 - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ /* typedef */ typedef long long ll; /* global variables */ /* subroutines */ /* main */ int main() { ll n; cin >> n; for (ll p = 3; p * p <= n; p++) if (n % p == 0) { printf("%lld\n", p); return 0; } printf("%lld\n", n); return 0; }