#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair pl; bool isprime(ll x) { if (x == 1)return true; if (x == 2)return true; if (x < 2 || x % 2 == 0)return false; ll i = 3; while (i <= sqrt(x)) { if (x % i == 0)return false; i = i + 2; } return true; } int main() { ll M; cin >> M; if (isprime(M)) cout << 1 << " " << M << endl; else{ for (int i = 2; i <= sqrt(M); i++) { if (M % i == 0) { cout << i << " " << M / i << endl; break; } } } return 0; }