#include #include using namespace std; int main() { long long m; cin >> m; if (m == 1) { cout << "1 1" << endl; return 0; } //偶数対応 if (m % 2 == 0) { cout << "2 " << m / 2 << endl; return 0; } bool sw = false; for (long long i = 2; i <= sqrt(m); i++) { if (m % i == 0) { cout << i << " " << m / i << endl; sw = true; break; } } if (sw == false) { cout << "1 " << m << endl; } return 0; }