#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << '\n';
}
const long long N = 2e5 + 100, oo = 1e9 + 9;
const long long mod = 1e9 + 9;
const long double eps = 1e-9, PI = 2 * acos(0.0);
long long n, m, k;
long long cnt = 0;
signed main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  vector<long long> vector<char>;
  for (long long i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      long long res = 1;
      while (n % i == 0) {
        n /= i;
        res *= i;
      }
      vector<char>.push_back(res);
    }
  }
  if (n != 1) {
    vector<char>.push_back(n);
  }
  sort(vector<char>.begin(), vector<char>.end());
  long long a = 1;
  long long b = 1;
  for (long long i = 0; i < ((long long)(vector<char>.size()));) {
    a *= vector<char>[i];
    i++;
    if (i == ((long long)(vector<char>.size()))) break;
    b *= vector<char>[i];
    i++;
    if (i == ((long long)(vector<char>.size()))) break;
  }
  cout << a << " " << b;
}
