#include <bits/stdc++.h>
using namespace std;
long long int prime[1000010];
long long int test[1000010];
long long int soin[20][2];
long long int mul[20];
int bit[20];
long long int pof2(long long int n) {
  if (n == 0)
    return 1;
  else
    return 2 * pof2(n - 1);
}
int main() {
  long long int T, tc, n, a, b, c, d, i, j, pos, st, ed, pv, l, r, flg, cnt,
      sum, p, e, rn, p2, ans;
  scanf("%lld", &n);
  rn = n;
  ans = n;
  if (n == 1) {
    printf("%d %d\n", 1, 1);
    return 0;
  }
  a = (long long int)sqrt(n);
  p = 0;
  test[0] = test[1] = 0;
  for (i = 2; i <= a; i++) test[i] = 1;
  for (i = 2; i <= a; i++) {
    if (test[i]) {
      prime[p++] = i;
      j = i;
      while (j <= a) {
        test[j] = 0;
        j += i;
      }
    }
  }
  cnt = 0;
  for (i = 0; i < p; i++) {
    e = 0;
    while (n % prime[i] == 0) {
      n /= prime[i];
      e++;
    }
    if (e > 0) {
      soin[cnt][0] = prime[i];
      soin[cnt][1] = e;
      cnt++;
    }
  }
  if (n > 1) {
    soin[cnt][0] = n;
    soin[cnt][1] = 1;
    cnt++;
  }
  for (i = 0; i < cnt; i++) {
    mul[i] = 1;
    for (j = 0; j < soin[i][1]; j++) mul[i] *= soin[i][0];
  }
  p2 = pof2(cnt);
  for (i = 0; i < p2; i++) {
    b = i;
    pos = 1;
    for (j = 0; j < cnt; j++) {
      if (b % 2 == 1) pos *= mul[j];
      b /= 2;
    }
    pos = (((pos) > (rn / pos)) ? (pos) : (rn / pos));
    ans = (((ans) < (pos)) ? (ans) : (pos));
  }
  printf("%lld %lld\n", (((ans) < (rn / ans)) ? (ans) : (rn / ans)),
         (((ans) > (rn / ans)) ? (ans) : (rn / ans)));
}
