#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x;
  cin >> x;
  long long int sq = sqrtl(x);
  if (sq * sq == x) {
    cout << 1 << " " << x << endl;
  } else {
    long long int flag = 0, i;
    for (i = 2; i * i < x; i++) {
      if (x % i == 0 && (x / i) % i) {
        flag = 1;
        cout << i << " " << x / i << endl;
        return 0;
      }
    }
    cout << 1 << " " << x << endl;
  }
  return 0;
}
