#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
int ans;
int main() {
  long long x;
  scanf("%lld", &x);
  for (long long i = 1; i * i <= x; ++i) {
    if (x % i == 0 && gcd(i, x / i) == 1) ans = i;
  }
  printf("%d %d\n", ans, x / ans);
  return 0;
}
