#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);
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long x;
  cin >> x;
  pair<int, int> ans;
  ans.first = ans.second = 1e9;
  for (long long i = 1; i * i <= x; i++) {
    if (x % i == 0) {
      long long a, b;
      a = i;
      b = x / i;
      long long lcm = a * b / gcd(a, b);
      if (lcm == x && ans.second > b) {
        ans.first = min(a, b);
        ans.second = max(a, b);
      }
    }
  }
  cout << ans.first << " " << ans.second;
  return 0;
}
