#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i;
  int a, b, diff = 1000000;
  for (i = 1; i <= n; i++) {
    if (n % i == 0) {
      if (abs(i - n / i) < diff) {
        a = i;
        b = n / i;
        diff = abs(i - n / i);
      }
    }
  }
  int m = min(a, b);
  int p = max(a, b);
  cout << m << " " << p;
  return 0;
}
