#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long x;
  cin >> x;
  long long a = 1, b = x;
  for (long long i = 1; i * i < x; i++) {
    if (x % i == 0) {
      a = i;
      b = x / i;
    }
  }
  cout << a << " " << b << endl;
  return 0;
}
