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