/* No.809 かけįŽ— https://yukicoder.me/problems/no/809 */ #include using namespace std; long int prime_factorize(long int c) { if (c % 2 == 0) { return 2; } else if (c % 5 == 0) { return 5; } for (int i = 3; i <= sqrt(c); i += 2) { if (c % i == 0) { return i; } } return 1; } int main() { ios::sync_with_stdio(0); cin.tie(0); long int c; cin >> c; long int div = prime_factorize(c); cout << div << " " << (c / div) << endl; }