#include <bits/stdc++.h>
using namespace std;
bool IsPrime(int number) {
  int i;
  for (i = 2; i * i < number; i++) {
    if (number % i == 0) break;
  }
  if (i * i > number) return true;
  return false;
}
int main() {
  int n, a, b;
  cin >> n;
  double sqrtn = sqrt(n);
  int flrsqrtn = floor(sqrtn);
  if (IsPrime(n)) {
    a = 1;
    b = n;
  } else if (sqrtn == ((n * 1.0) / sqrtn)) {
    a = b = sqrtn;
  } else {
    a = flrsqrtn;
    while ((n % a) != 0) a--;
    b = n / a;
  }
  cout << a << ' ' << b << endl;
  return 0;
}
