#include <bits/stdc++.h>
using namespace std;
inline long long gcd(long long a, long long b) {
  return b > 0 ? gcd(b, a % b) : a;
}
inline long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') {
      f = -1;
    }
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = 10 * x + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const long long maxnum = 1000005;
long long a[maxnum], dp[maxnum];
signed main() {
  long long n = read();
  long long MAX = 0;
  pair<long long, long long> ans;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      long long a = i, b = n / i;
      long long res = gcd(a, b);
      if (a * res >= b) {
        MAX = max(a * res, MAX);
        ans = {a * res, b};
      } else {
        MAX = max(b * res, MAX);
        ans = {a, b * res};
      }
    }
  }
  cout << ans.first << " " << ans.second << endl;
  return 0;
}
