#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j = 1, n, k = 1;
  cin >> n;
  for (int i = 1; i < n / 2 + 1; i++) {
    if (n % i == 0 && i <= n / i) {
      j = i;
      k = n / i;
    }
  }
  cout << j << " " << k;
  return 0;
}
