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