#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long x;
  cin >> x;
  vector<long long> f;
  long long ans = LLONG_MAX, ansx, ansy;
  for (long long i = 1; i <= 1000000; ++i) {
    if (x % i == 0) {
      long long y = i, z = x / i;
      if (ans > max(y, z)) {
        ansx = y;
        ansy = z;
      }
      ans = min(ans, max(y, z));
    }
  }
  cout << ansx << ' ' << ansy << endl;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
