#include <bits/stdc++.h>
using namespace std;
int prime[1000003], tot;
bool vis[1000003];
void shai(long long X) {
  tot = 0;
  memset(vis, 0, sizeof(vis));
  for (long long i = 2; i < X; i++) {
    if (!vis[i]) {
      prime[tot++] = i;
    }
    for (long long j = 0; j < tot && prime[j] * i < X; j++) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) {
        break;
      }
    }
  }
}
int q[100003], len;
bool can[10000003];
int main() {
  long long n, m;
  cin >> n;
  if (n == 1) {
    cout << "1 1";
    return 0;
  }
  shai((int)(sqrt(n)) + 10);
  int i = 0;
  m = n, len = 0;
  while (1) {
    if (prime[i] * prime[i] > n) break;
    while (m % (long long)prime[i] == 0) {
      m /= prime[i];
      ++len;
      q[len] = i;
    }
    if (m == 1) break;
    ++i;
  }
  int sqr = (int)sqrt(n) + 10;
  memset(can, 0, sizeof(can));
  can[1] = true;
  for (register int i = 1; i <= len; i++) {
    int lens = sqr / prime[q[i]];
    for (register int j = lens; j >= 1; --j)
      if (can[j]) can[j * prime[q[i]]] = 1;
  }
  for (register int i = sqr - 10; i >= 1; i--) {
    if (can[i]) {
      printf("%d %I64d", i, n / i);
      return 0;
    }
  }
  return 0;
}
