#include <bits/stdc++.h>
using namespace std;
long long n, l, r, m, x, y;
int main() {
  cin >> n;
  m = 1000000000;
  x = 1;
  y = n;
  while (y % 2 == 0) {
    y /= 2;
    x *= 2;
  }
  m = min(m, max(x, y));
  for (int i = 3; i * i <= y; i += 2) {
    while (y % i == 0) {
      y /= i;
      x *= i;
    }
    m = min(m, max(x, y));
  }
  cout << m << " " << n / m << endl;
  return 0;
}
