#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 * 100 + 20;
long long n, a = 1, b = 1, cnt, res[MAXN];
bool flag;
void counter(long long x) {
  for (long long i = 2; i * i <= x; i++)
    if (x % i == 0) {
      while (x % i == 0) {
        res[cnt] *= i;
        x /= i;
      }
      cnt++;
    }
  res[cnt++] *= x;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  cin >> n;
  for (int i = 0; i < MAXN; i++) res[i] = 1;
  counter(n);
  sort(res, res + cnt);
  if (cnt % 2) {
    for (int i = 0; i < cnt / 2; i++) {
      if (flag)
        a *= 1ll * res[i] * res[cnt - i - 1];
      else
        b *= 1ll * res[i] * res[cnt - i - 1];
      flag = !flag;
    }
    if (flag)
      a *= res[cnt / 2];
    else
      b *= res[cnt / 2];
  } else {
    for (int i = 0; i < cnt / 2; i++) {
      if (flag)
        a *= 1ll * res[i] * res[cnt - i - 1];
      else
        b *= 1ll * res[i] * res[cnt - i - 1];
      flag = !flag;
    }
  }
  if (cnt == 1)
    cout << 1 << ' ' << res[0] << endl;
  else if (cnt == 2)
    cout << res[0] << ' ' << res[1] << endl;
  else if (cnt == 3)
    cout << 1ll * res[0] * res[2] << ' ' << res[1] << endl;
  else
    cout << a << ' ' << b << endl;
  return 0;
}
