#include <bits/stdc++.h>
using namespace std;
bool isprime(long long n) {
  long long c = 0;
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      c = 1;
      break;
    }
  }
  if (c == 0)
    return true;
  else
    return false;
}
void CyBerForCe() {
  long long x;
  cin >> x;
  vector<pair<long long, long long> > v;
  v.push_back(make_pair(1, x));
  for (long long i = 2; i <= sqrt(x); i++) {
    if (x % i == 0) {
      long long d1 = i, d2 = x / i;
      if (isprime(d1) || isprime(d2)) v.push_back(make_pair(d1, d2));
    }
  }
  long long a = 0, b = 0, m = INT_MAX;
  for (long long i = 0; i < v.size(); i++) {
    long long ma = max(v[i].first, v[i].second);
    if (ma < m) {
      m = ma;
      a = v[i].first;
      b = v[i].second;
    }
  }
  cout << a << " " << b;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  CyBerForCe();
  return 0;
}
