#include <bits/stdc++.h>
using namespace std;
int isPrime(long long n) {
  float n_sqrt;
  if (n == 2 || n == 3) return 1;
  if (n % 6 != 1 && n % 6 != 5) return 0;
  n_sqrt = floor(sqrt((float)n));
  for (int i = 5; i <= n_sqrt; i += 6) {
    if (n % (i) == 0 | n % (i + 2) == 0) return 0;
  }
  return 1;
}
long long gcd(long long a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long x;
  while (~scanf("%lld", &x)) {
    if (isPrime(x) == 1 || sqrt(x) * sqrt(x) == x) {
      printf("1 %lld", x);
    } else {
      long long z = sqrt(x);
      for (long long i = 2; i <= z; i++) {
        if (x % i == 0) {
          if (gcd(x / i, i) == 1) {
            printf("%lld %lld", i, x / i);
            break;
          }
        }
      }
    }
    printf("\n");
  }
  return 0;
}
