#include <bits/stdc++.h>
using namespace std;
long long n, m;
int prim[2000002], cnt;
bool isp[2000002];
int js, ps[2000002], ci[2000002];
long long pr[2000002];
int main() {
  scanf("%lld", &n);
  m = n;
  if (n == 1) {
    puts("1 1");
    return 0;
  }
  for (int i = 2; i <= 2000000; i++) isp[i] = 1;
  for (int i = 2; i <= 2000000; i++) {
    if (isp[i]) prim[++cnt] = i;
    for (int j = 1; j <= cnt && prim[j] * i <= 2000000; j++) {
      isp[prim[j] * i] = 0;
      if (i % prim[j] == 0) break;
    }
  }
  for (int i = 1; i <= cnt && prim[i] <= n; i++) {
    if (n % prim[i] == 0) {
      ps[++js] = prim[i];
      pr[js] = 1;
      while (n % prim[i] == 0) {
        ci[js]++;
        n /= prim[i];
        pr[js] *= prim[i];
      }
    }
  }
  if (n > 1) ps[++js] = n, ci[js] = 1, pr[js] = n;
  long long mn = 1e18, as1, as2;
  for (int i = 1; i < (1 << js); i++) {
    long long tp = 1;
    for (int j = 1; j <= js; j++) {
      if (i & (1 << (j - 1))) tp *= pr[j];
    }
    long long ano = m / tp;
    if (max(tp, ano) < mn) {
      mn = max(tp, ano);
      as1 = tp, as2 = ano;
    }
  }
  printf("%I64d %I64d\n", as1, as2);
}
