#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
int main() {
  int a, b;
  int n;
  cin.sync_with_stdio(false);
  while (cin >> n) {
    a = 1, b = n;
    int k = sqrt(n);
    for (int i = 2; i <= k; i++) {
      int j = n / i;
      if (i * j == n) {
        if (abs(i - j) < (b - a)) {
          a = min(i, j);
          b = max(i, j);
        }
      }
    }
    cout << a << " " << b << endl;
  }
  return 0;
}
