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