#include using namespace std; int main() { long long m; cin >> m; int x, y; for (int i = 2; i <= 1000000; i++) { if (m % i == 0) { x = i; y = m / i; break; } if (i == 1000000) { x = 1; y = m; } } cout << x << " " << y << endl; return 0; }