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