#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, x, y;
    cin >> n;
    m = n;
    x = 1;
    y = n;
    if (n == 1) {
      cout << 1 << " " << 1;
      return 0;
    }
    vector<long long> v;
    for (long long i = 2; i * i <= n; i++) {
      long long xx, yy;
      if (m % i == 0) {
        xx = i;
        yy = n / i;
        m /= i;
        while (m % i == 0) {
          xx *= i;
          yy /= i;
          m /= i;
        }
        if (max(x, y) > max(xx, yy)) {
          x = xx;
          y = yy;
        }
      }
    }
    cout << x << " " << y;
    return 0;
  }
  return 0;
}
