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