#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
long long X, k = 1;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> X;
  for (long long i = 1; i * i <= X; ++i) {
    if (X % i == 0 && lcm(i, X / i) == X) k = i;
  }
  cout << k << " " << X / k;
}
