#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  int a = 1, b = n, currDiff = 2000000007;
  for (int i = 1; i <= n; i++) {
    int temp = n / i;
    if (i * temp == n) {
      if (abs(temp - i) < currDiff) {
        a = i, b = temp;
        currDiff = abs(temp - i);
      }
    }
  }
  cout << min(a, b) << " " << max(a, b);
  return 0;
}
