#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
  long long ans = (a * b) / gcd(a, b);
  return ans;
}
int main() {
  long long x;
  cin >> x;
  vector<long long> v;
  for (long long i = 1; i <= (long long)sqrt(x); i++) {
    if (x % i == 0) {
      v.push_back(i);
    }
  }
  long long minv = x;
  for (auto i = v.begin(); i != v.end(); i++) {
    if (lcm(*i, x / (*i)) == x) {
      long long temp = max(*i, x / (*i));
      minv = min(temp, minv);
    }
  }
  cout << minv << " " << x / minv << endl;
  return 0;
}
