#include <bits/stdc++.h>
using namespace std;
long long n;
pair<long long, long long> p, ans;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int main() {
  ans = make_pair(0x3fffffffff, 0x3fffffffff);
  cin >> n;
  for (long long i = 1; i <= min(long long(sqrt(n) + 3), n); i++) {
    if (n % i == 0) {
      if (lcm(n / i, i) == n) {
        if (max(ans.first, ans.second) > max(n / i, i)) {
          ans = make_pair(n / i, i);
        }
      }
    }
  }
  cout << ans.first << " " << ans.second;
  return 0;
}
