#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> f;
  for (long long x = 2; x * x <= n; x++) {
    while (n % x == 0) {
      f.push_back(x);
      n /= x;
    }
  }
  if (n > 1) f.push_back(n);
  long long a = 1, b = 1;
  for (auto i : f) {
    if (a >= b)
      b *= i;
    else
      a *= i;
  }
  if (f.size() == 0)
    cout << 1 << " " << 1 << "\n";
  else {
    if (a == b) {
      long long c = f[0];
      for (long long i = 0; i < f.size(); i++) {
        if (f[i] != c) {
          c = f[i];
          break;
        }
      }
      if (c == f[0]) {
        a *= f[0];
        b /= f[0];
      } else {
        a = (a * f[0]) / c;
        b = (b * c) / f[0];
      }
    }
    if (a <= b)
      cout << a << " " << b << "\n";
    else
      cout << b << " " << a << "\n";
  }
  return 0;
}
