#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a, b, min = 999999999, aa, ab;
  for (a = 1; a <= n; a++) {
    if (n % a == 0) {
      b = n / a;
      if (b - a < min and b > a or b == a) {
        aa = a;
        ab = b;
        min = b - a;
      }
    }
  }
  cout << aa << " " << ab << endl;
  return 0;
}
