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