#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x = 1, y = n, sb = n - 1;
  for (int i = 1; i <= n / 2; i++) {
    if (n % i == 0) {
      int xx = i, yy = n / i;
      if (abs(xx - yy) < sb) {
        x = xx;
        y = yy;
        sb = abs(xx - yy);
      }
    }
  }
  cout << min(x, y) << ' ' << max(x, y) << endl;
  return 0;
}
