#define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; int main(){ ll M; cin >> M; vector B(1000001, true); B[0] = B[1] = false; for(int i = 2; i <= sqrt(1000000); i++){ if(!B[i]) continue; for(int j = i*2; j <= 1000000; j += i){ B[j] = false; } } for(int i = 2; i <= sqrt(M); i++){ if(!B[i]) continue; if(M%i == 0){ cout << i << " " << M/i << endl; return 0; } } cout << 1 << " " << M << endl; }