#include <bits/stdc++.h>
using namespace std;
const int MXN = 2e5 + 9;
long long N, r, c;
int main() {
  cin >> N;
  long long diff = 1e17;
  for (int i = 1; i <= N; ++i) {
    long long one = i;
    if (N % i == 0) {
      long long two = N / i;
      if ((max(one, two) - min(one, two)) < diff) {
        r = min(one, two);
        c = max(one, two);
        diff = c - r;
      }
    }
  }
  cout << r << " " << c << "\n";
  return 0;
}
