#include <bits/stdc++.h>
using namespace std;
const int maxn = 100;
long long num[maxn];
int flag = -1;
int main() {
  long long n;
  scanf("%lld", &n);
  long long tmp = n;
  for (int i = 0; i < maxn; i++) num[i] = 1;
  for (int i = 2; i <= n && i * i <= tmp; i++) {
    if (n % i == 0) flag++;
    while (n % i == 0) {
      num[flag] *= i;
      n = n / i;
    }
    if (n % (tmp / i) == 0) flag++;
    while (n % (tmp / i) == 0) {
      num[flag] *= (tmp / i);
      n = n / (tmp / i);
    }
  }
  long long ans = tmp;
  for (int i = 0; i <= flag; i++) {
    ans = min(ans, max(num[i], tmp / num[i]));
  }
  printf("%lld %lld\n", tmp / ans, ans);
}
