#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;
  cin >> X;
  long long a = 1, b = X;
  long long m = X;
  for (long long i = 2; i * i < X; i++) {
    if (X % i == 0) {
      long long ta = i;
      long long tb = X / i;
      if (X * gcd(ta, tb) == ta * tb) {
        if (max(ta, tb) < m) {
          m = max(ta, tb);
          a = ta;
          b = tb;
        }
      }
    }
  }
  cout << a << " " << b << endl;
  return 0;
}
