#include <bits/stdc++.h>
using namespace std;
int main() {
  long double X, MAXI;
  cin >> X;
  vector<long double> vt(2);
  vt[0] = 1;
  vt[1] = trunc(X);
  MAXI = trunc(X);
  for (int i = 2; i <= sqrt(X); ++i) {
    if ((fmod(X, i)) == 0) {
      if (trunc(X - i) < MAXI) {
        MAXI = trunc(X - i);
        vt[0] = i;
        vt[1] = X / i;
      }
    }
  }
  cout << trunc(vt[0]) << "  " << trunc(vt[1]) << endl;
  return 0;
}
