#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  long long x;
  cin >> x;
  long long ans = x;
  for (long long i = 1; i <= sqrt(x); i++) {
    if (x % i == 0 && gcd(i, x / i) == 1) {
      ans = min(ans, max(i, x / i));
    }
  }
  cout << x / ans << " " << ans << endl;
  return 0;
}
