#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  ;
  int precision = numeric_limits<double>::digits10;
  ;
  int n;
  cin >> n;
  int j = sqrt(n), k = sqrt(n);
  for (int i = j; i > 0; i--) {
    for (int p = k; p < n + 1; p++) {
      if (i * p == n) {
        cout << i << " " << p << endl;
        return 0;
      }
    }
  }
}
