#include <bits/stdc++.h>
using namespace std;
const long long inf = 1ll << 60;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int main() {
  long long x;
  scanf("%lld", &x);
  long long cnm = (long long)sqrt(x);
  long long ansy = x;
  for (long long i = 2; i <= cnm; i++) {
    if (x % i == 0 && gcd(x / i, i) == 1) {
      ansy = min(ansy, x / i);
    }
  }
  printf("%lld %lld\n", x / ansy, ansy);
  return 0;
}
