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