#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    gcd(b, a % b);
}
int main() {
  long long n;
  read(n);
  long long x = sqrt(n);
  if (x * x == n) x -= 1;
  for (long long i = x; i >= 1; i--) {
    if (n % i == 0) {
      if (gcd(n / i, i) == 1) {
        printf("%lld %lld", i, n / i);
        return 0;
      }
    }
  }
  printf("1 %lld", n);
  return 0;
}
