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