#include #include using namespace std; int main() { long long int n; cin >> n; if (n % 2 == 0) { cout << 2 << " " << n / 2 << endl; return 0; } for (long long int i = 3; i*i <= n; i++) { if (n%i == 0) { cout << i << " " << n / i << endl; return 0; } } cout << 1 << " " << n << endl; return 0; }