#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b = 0, j;
  cin >> n;
  vector<int> v1;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      int j = n / i;
      v1.push_back(i);
      v1.push_back(j);
      b = b + 2;
      if (i >= j) {
        break;
      }
    }
  }
  cout << v1.at(b - 1) << " " << v1.at(b - 2);
  return 0;
}
