#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
void prework() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
struct pair {
  long long x, y;
} arr[maxn];
int main() {
  prework();
  long long x;
  scanf("%lld", &x);
  int len = 0;
  for (int i = 1; i <= sqrt(x) + 1; i++) {
    if (x % i == 0) {
      long long cur = x / i;
      arr[len].x = i;
      arr[len++].y = cur;
    }
  }
  long long x1 = arr[0].x, x2 = arr[0].y;
  for (int i = 1; i < len; i++) {
    if (arr[i].x == arr[i].y) continue;
    if (max(arr[i].x, arr[i].y) < max(x1, x2)) {
      x1 = arr[i].x;
      x2 = arr[i].y;
    }
  }
  printf("%lld %lld\n", x1, x2);
  return 0;
}
