#include <bits/stdc++.h>
using namespace std;
int ps(long long n) {
  long long x, m;
  m = n;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      x = i;
      break;
    }
  }
  while (n % x == 0) n /= x;
  if (n == 1) {
    cout << 1 << " " << m;
    return 1;
  }
  return 0;
}
int main() {
  int t = 1;
  while (t--) {
    long long n, m;
    cin >> n;
    m = n;
    if (n == 1) {
      cout << 1 << " " << 2;
      return 0;
    }
    vector<long long> v;
    v.push_back(1);
    if (ps(n)) return 0;
    for (long long i = 2; i * i <= n; i++) {
      while (m % i == 0) {
        m = m / i;
        v.push_back(i);
      }
    }
    if (m != 1) v.push_back(m);
    priority_queue<long long, vector<long long>, greater<long long>> pq;
    for (int i = 0; i < (int)v.size(); i++) pq.push(v[i]);
    while (pq.size() > 2) {
      n = pq.top();
      pq.pop();
      m = pq.top();
      pq.pop();
      pq.push(n * m);
    }
    n = pq.top();
    pq.pop();
    m = pq.top();
    pq.pop();
    cout << n << " " << m;
  }
  return 0;
}
