#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a, b, dif = INT_MAX;
  if (n == 1) {
    cout << 1 << ' ' << 1 << '\n';
    return 0;
  }
  for (int i = 1; i <= n / 2; ++i) {
    if (n % i == 0) {
      if (abs(i - (n / i)) < dif) {
        dif = abs(i - (n / i));
        a = i, b = n / i;
      }
    }
  }
  cout << a << ' ' << b << '\n';
}
