#include <bits/stdc++.h>
using namespace std;
long long expo(long long base, long long exponent, long long mod) {
  long long ans = 1;
  while (exponent != 0) {
    if ((exponent & 1) == 1) {
      ans = ans * base;
      ans = ans % mod;
    }
    base = base * base;
    base %= mod;
    exponent >>= 1;
  }
  return ans % mod;
}
bool iflog(long long n) {
  for (long long int i = 2; i < n; i++) {
    if (expo(i, log(n) / log(i), 1000000007) == n) return true;
  }
  return false;
}
long long floorSqrt(long long x) {
  if (x == 0 || x == 1) return x;
  long long start = 1, end = x, ans;
  while (start <= end) {
    long long mid = (start + end) / 2;
    if (mid * mid == x) return mid;
    if (mid * mid < x) {
      start = mid + 1;
      ans = mid;
    } else
      end = mid - 1;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long i, j, k, n, sq;
    cin >> n;
    sq = floorSqrt(n);
    if (iflog(n) || sq * sq == n) {
      cout << "1 " << n << '\n';
      return 0;
    }
    for (i = sq; i <= n; i++) {
      if (n % i == 0) {
        cout << i << " " << n / i << '\n';
        return 0;
      }
    }
  }
  return 0;
}
