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