#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  long long int n, x, ans, ans1, y;
  cin >> y;
  n = (long long int)sqrt((double)y);
  for (long long int i = n; i > 0; i--) {
    if (y % i == 0) {
      x = y / i;
      if (gcd(i, x) == 1) {
        ans = i;
        ans1 = x;
        break;
      }
    }
  }
  if (y != 1)
    cout << ans << ' ' << ans1 << endl;
  else
    cout << 1 << ' ' << 1 << endl;
}
