#include <bits/stdc++.h>
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
int main() {
  long long n, a, b, c;
  scanf("%lld", &n);
  for (long long i = 1; i * i <= n; i++)
    if (n % i == 0 && gcd(i, n / i) == 1) {
      a = i;
      b = n / i;
    }
  printf("%lld %lld\n", a, b);
}
