#include <bits/stdc++.h>
long long n;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
int main() {
  scanf("%lld", &n);
  long long l = 1, r = n;
  while (r != l) {
    long long md = (l + r + 1) >> 1;
    if (md * md < n)
      l = md;
    else if (md * md > n)
      r = md - 1;
    else
      l = r = md;
  }
  for (int i = l; i >= 1; i--)
    if (n % i == 0 && gcd(i, n / i) == 1) return !printf("%d %lld", i, n / i);
}
