#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, mx = 0;
  cin >> n;
  if (n == 1) return puts("1 1");
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      mx = max(i, n / i);
    }
  }
  if (mx == 0)
    cout << 1 << " " << n;
  else
    cout << n / mx << " " << mx;
}
