#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x;
  while (cin >> x) {
    long long int tmp = 1, temp = 0;
    temp = x;
    for (int i = 1; i <= sqrt(temp); i++) {
      if (temp % i == 0) {
        temp /= i;
        tmp = i;
      }
      if (i > temp) break;
    }
    if (tmp == temp && temp == sqrt(x))
      cout << "1 " << x << endl;
    else
      cout << tmp << " " << x / tmp << endl;
  }
  return 0;
}
