#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int r = sqrt(n);
  for (; r >= 1; r--) {
    if (n % r == 0) {
      cout << r << " " << n / r << endl;
      return 0;
    }
  }
  return 0;
}
