#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long int main() { llong m; cin >> m; llong result = 1; for(int i=2; i<=(int)sqrt(m)+1; i++) { if(m % i == 0) { result = i; break; } } cout << result << " " << m / result << endl; }