#include <bits/stdc++.h>
using namespace std;
long long n, a, b = 10000000000, c, d;
int main() {
  cin >> n;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (!(n % i) && ((n / i) - i) < (b - a)) {
      b = n / i;
      a = i;
    }
  }
  cout << a << " " << b;
}
