#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  long long x;
  cin >> x;
  long long t = x;
  if (x == 1) {
    cout << "1 1";
    return 0;
  }
  vector<long long> vec;
  for (long long i = 2; i * i <= x; ++i) {
    if (x % i == 0) {
      vec.push_back(i);
      while (x % i == 0) x /= i;
    }
  }
  if (x != 1) vec.push_back(x);
  long long mina = 1e11, minb = 1e11;
  for (long long i = 0; i < vec.size(); ++i) {
    if (min(t / vec[i], vec[i]) < min(mina, minb) && t / vec[i] != vec[i]) {
      mina = t / vec[i];
      minb = vec[i];
    }
  }
  cout << mina << ' ' << minb;
  return 0;
}
