#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x, temp = x;
  cin >> x;
  long long ans1 = 1;
  while (temp % 2 == 0) {
    temp = temp / 2;
    ans1 = 2;
  }
  long long ans2 = x / ans1;
  for (int i = 3; i <= ceil(sqrt(x)); i += 2) {
    while (temp % i == 0) {
      temp = temp / i;
      ans1 = i;
    }
  }
  ans2 = x / ans1;
  cout << ans1 << " " << ans2;
}
