#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  long long x, a, b, ans = INT_MAX;
  cin >> x;
  for (long long i = 1; i * i <= x; i++) {
    long long lcm = (x / i) / gcd(x / i, i) * i;
    if (x % i == 0 and lcm == x) {
      long long m = max(i, x / i);
      if (m < ans) {
        a = i;
        b = x / i;
        ans = m;
      }
    }
  }
  cout << a << " " << b << endl;
}
