#include <bits/stdc++.h>
using namespace std;
struct primefactorisation {
  long long count, pf;
};
void generate(long long curr_idx, long long curr_divisor,
              vector<primefactorisation> &arr, vector<long long> &final) {
  if (curr_idx == arr.size()) {
    final.push_back(curr_divisor);
    return;
  }
  for (long long i = 0; i <= arr[curr_idx].count; i++) {
    generate(curr_idx + 1, curr_divisor, arr, final);
    curr_divisor *= arr[curr_idx].pf;
  }
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
void fun(long long n) {
  long long d = n;
  vector<primefactorisation> arr;
  for (long long i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      long long cnt = 0;
      while ((n % i) == 0) {
        n = n / i;
        cnt++;
      }
      arr.push_back({cnt, i});
    }
  }
  if (n > 1) {
    arr.push_back({1, n});
  }
  long long curr_idx = 0, curr_divisor = 1;
  vector<long long> final;
  generate(curr_idx, curr_divisor, arr, final);
  sort(final.begin(), final.end());
  long long mini = LLONG_MAX, a = -1, b = -1;
  for (int i = 0; i < final.size(); i++) {
    long long x = final[i];
    if (gcd(max(x, d / x), min(x, d / x)) == 1) {
      if (max(x, d / x) < mini) {
        a = min(x, d / x);
        b = max(x, d / x);
        mini = b;
      }
    }
  }
  cout << a << " " << b;
  return;
}
int main() {
  long long x;
  cin >> x;
  fun(x);
  return 0;
}
