#include <bits/stdc++.h>
using namespace std;
bool myfunction(int i, int j) { return (i > j); }
int main() {
  long long n;
  while (cin >> n) {
    long long ans = n;
    long long ans1 = 1;
    long long diff = ans - ans1;
    long long lim = n / 2;
    for (long long i = 1; i <= lim; i++) {
      if (n % i == 0) {
        if (abs(i - n / i) < diff) {
          diff = abs(i - n / i);
          ans = i;
          ans1 = n / i;
        }
      }
    }
    long long m1 = min(ans, ans1);
    long long m2 = max(ans, ans1);
    cout << m1 << " " << m2 << endl;
  }
  return 0;
}
