#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0, j, dif, c = 0, a, b;
  cin >> n;
  if (n == 1) {
    cout << "1   1";
    return 0;
  }
  int d[1000];
  for (j = n; j > 0; j--) {
    if (n % j == 0) {
      d[i] = j;
      i++;
      c++;
    }
  }
  dif = d[0] - d[c - 1];
  for (i = 0; i <= c / 2; i++) {
    if (d[i] - d[c - 1 - i] < dif) {
      a = d[i];
      b = d[c - 1 - i];
    }
  }
  if (a > b) {
    a = a * b;
    b = a / b;
    a = a / b;
  }
  cout << a << "   " << b;
  return 0;
}
