#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int r, c;
  int diff = INT_MAX;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      if (i <= (n / i)) {
        if (((n / i) - i) < diff) {
          r = i;
          c = n / i;
          diff = c - r;
        }
      }
    }
  }
  cout << r << " " << c << endl;
  return 0;
}
