#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x;
  cin >> x;
  long long sq;
  sq = sqrt(x);
  long long a = 1, b;
  for (int i = 1; i <= sq; ++i) {
    if (x % i == 0) {
      if ((x / i) != i) a = i;
    }
  }
  b = x / a;
  cout << a << " " << b << endl;
  return 0;
}
