#include <bits/stdc++.h>
using namespace std;
const unsigned long long inf = 1e9;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  while (a) {
    b %= a;
    swap(a, b);
  }
  return b;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  unsigned long long N;
  cin >> N;
  unsigned long long ans = -1;
  for (unsigned long long i = 1; i * i <= N; i++) {
    if (N % i == 0 && gcd(i, N / i) == 1) {
      ans = i;
    }
  }
  cout << ans << ' ' << N / ans;
  return 0;
}
