#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-8;
const int INF = 0x3F3F3F3F;
const int64_t LINF = 4611686018427387903;
const int MOD = 1e9 + 7;
const int MAXN = 2e5 + 9;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  int64_t x;
  cin >> x;
  vector<int64_t> arr;
  for (int64_t i = 2; i * i <= x; i++) {
    int64_t a = 1;
    while ((x % i) == 0) {
      a *= i;
      x /= i;
    }
    if (a > 1) arr.push_back(a);
  }
  if (x > 1) arr.push_back(x);
  int64_t a = 1, b = 1, c = INF, d = INF;
  for (int64_t i = 0; i < (1 << arr.size()); i++) {
    a = 1, b = 1;
    for (int64_t j = 0; j < arr.size(); j++) {
      if ((((i) >> (j)) & 1LL)) {
        a *= arr[j];
      } else {
        b *= arr[j];
      }
    }
    if (max(c, d) > max(a, b)) {
      c = a, d = b;
    }
  }
  cout << c << ' ' << d;
  return 0;
}
