#include <bits/stdc++.h>
using namespace std;
long long x;
int main() {
  cin >> x;
  vector<long long> f;
  for (long long i = 2; i * i <= x; ++i) {
    if (x % i == 0) {
      long long cur = 1;
      while (x % i == 0) {
        x /= i;
        cur *= i;
      }
      f.push_back(cur);
    }
  }
  if (x > 1) f.push_back(x);
  int n = f.size();
  long long ansa = 1e18, ansb = 1e18;
  for (int i = 0; i < (1 << n); ++i) {
    long long a = 1, b = 1;
    for (int j = 0; j < n; ++j) {
      if ((i >> j) & 1)
        a *= f[j];
      else
        b *= f[j];
    }
    if (max(a, b) < max(ansa, ansb)) {
      ansa = a;
      ansb = b;
    }
  }
  cout << ansa << " " << ansb << endl;
  return 0;
}
