#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long power(long long a, long long b, long long ret = 1LL) {
  while (b--) ret = (ret * a);
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, x;
  cin >> x;
  n = x;
  long long ans = 1;
  for (long long i = 2; i * i <= n; i++)
    if (n % i == 0) {
      if (lcm(i, x / i) == x) ans = i;
    }
  cout << ans << " " << x / ans;
  return 0;
}
