#include <bits/stdc++.h>
using namespace std;
long long a;
int gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
void solve(long long a) {
  long long mi = 1e8;
  long long mn = 1e8;
  for (long long i = 1; i * i <= a; i++) {
    if (a % i == 0) {
      if (a == ((i, a / i) / (gcd(i, a / i)))) {
        mi = min(mi, i);
      }
      if (a == ((i, a / i) / (gcd(i, a / i)))) {
        mn = min(mn, a / i);
      }
    }
  }
  cout << mi << " " << mn << "\n";
}
int main() {
  scanf("%lld", &a);
  solve(a);
  return 0;
}
