#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, s, q;
  cin >> a;
  q = sqrt(a);
  for (int i = q; i > 0; i--) {
    s = a / i;
    if (s * i == a) {
      cout << i << " " << s << endl;
      break;
    }
  }
  return 0;
}
