#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int c, d;
  double n;
  cin >> n;
  if (n == 1)
    cout << 1 << " " << 1 << endl;
  else {
    d = sqrt(n);
    for (long long int i = d; i > 0; i--) {
      if ((long long int)n % i == 0) {
        if ((long long int)n / i != i) {
          cout << i << " " << (long long int)n / i << endl;
          return 0;
        }
      }
    }
  }
}
