#include <bits/stdc++.h>
using namespace std;
vector<int> v;
long long fac = 10000000000000;
int n;
long long x;
void ans(long long i, long long mul) {
  if (mul > fac) return;
  fac = min(fac, max(mul, x / mul));
  for (int j = i + 1; j < n; j++) {
    ans(j, mul * v[j]);
  }
}
int main() {
  cin >> x;
  long long mul = 1;
  for (int i = 2; i <= x; i++) {
    while (x % i == 0) {
      v.push_back(i);
      mul *= i;
      x /= i;
    }
  }
  x = mul;
  n = v.size();
  ans(-1, 1);
  cout << x / fac << " " << fac;
}
