#include <bits/stdc++.h>
using namespace std;
const long long siz = 1e6 + 5;
const long long MOD = 1e9 + 7;
vector<long long> primes;
map<long long, long long> check;
void factor(long long n) {
  while (n % 2 == 0) {
    if (!check[2]) primes.push_back(2);
    check[2]++;
    n = n / 2;
  }
  for (long long i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      if (!check[i]) primes.push_back(i);
      check[i]++;
      n = n / i;
    }
  }
  if (n > 2) {
    if (!check[n]) primes.push_back(n);
    check[n]++;
  }
}
void solve() {
  long long n;
  cin >> n;
  factor(n);
  long long ans = 1, k = 1, res = 1;
  for (long long i = 0; i < primes.size(); i++) {
    ans = pow(primes[i], check[primes[i]]);
    if (k <= res)
      k *= ans;
    else
      res *= ans;
  }
  cout << k << " " << res << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
