#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int m = n;
  long long int ld = 1;
  map<long long int, long long int> mp;
  while (n % 2 == 0) {
    mp[2]++;
    n = n / 2;
  }
  if (n == 1)
    ld = n;
  else {
    for (long long int i = 3; i <= sqrt(n); i += 2) {
      if (n % i == 0) {
        while (n % i == 0) {
          mp[3]++;
          n = n / i;
        }
        if (n == 1) {
          ld = pow(i, mp[i]);
          break;
        }
      }
    }
    if (n > 2) ld = n;
  }
  cout << ld << " " << m / ld << endl;
}
