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