#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m = 999999999, minimum = 999999999;
  int newa, newb;
  cin >> n;
  long long a = 0, b = 1;
  for (a = 1; a <= n; ++a) {
    if (n % a == 0) {
      if (a <= n / a) {
        if (abs(b - a) < m) {
          b = n / a;
          newa = a;
          m = abs(b - a);
        }
      }
    }
  }
  cout << newa << " " << b;
  return 0;
}
