#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << 1 << " " << 1 << endl;
    return;
  }
  for (long long i = sqrt(n); i > 0; i--) {
    if (n % i == 0) {
      if (n / i != i && i % (n / i) != 0) {
        cout << i << " " << n / i << endl;
        return;
      }
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  solve();
}
