#include <bits/stdc++.h>
using namespace std;
long long n, v[1000005];
int main() {
  cin >> n;
  for (int i = 2; i * i <= n; ++i) {
    while (n % i == 0) {
      ++v[i];
      n /= i;
    }
  }
  long long a = 1, b = 1;
  for (int i = 2; i * i <= n; ++i) {
    while (v[i]) {
      if (a > b)
        a *= i;
      else
        b *= i;
      --v[i];
    }
  }
  cout << a << ' ' << b;
  return 0;
}
