#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  int a, b;
  int ans = 100100100;
  for (int i = 1; i <= n; i++)
    if (n % i == 0) {
      int aa = i, bb = n / i;
      if (abs(aa - bb) < ans) {
        ans = abs(aa - bb);
        a = max(aa, bb);
        b = min(aa, bb);
      }
    }
  cout << b << ' ' << a;
  return 0;
}
