#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  priority_queue<long long, vector<long long>, greater<long long>> q;
  for (long long i = 2; i * i <= n; i++) {
    long long t = 1;
    while (n % i == 0) t *= i, n /= i;
    q.push(t);
  }
  if (n > 1) q.push(n);
  while (q.size() > 2) {
    long long t = q.top();
    q.pop();
    t *= q.top();
    q.pop();
    q.push(t);
  }
  if (q.size() <= 1) q.push(1);
  if (q.size() <= 1) q.push(1);
  cout << q.top() << ' ';
  q.pop();
  cout << q.top();
  return 0;
}
