#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, res = 1;
  cin >> n;
  for (int a = 1;; ++a) {
    int b = n / a;
    if (a > b) break;
    if (a * b != n) continue;
    res = a;
  }
  cout << res << ' ' << n / res << endl;
  return 0;
}
