#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  long long r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  long long X;
  cin >> X;
  long long a = 1;
  long long b = X;
  for (long long i = 1; i * i <= X; i++) {
    long long j = X / i;
    if (i * j != X || gcd(i, j) != 1) continue;
    if (max(a, b) > max(i, j)) {
      a = i;
      b = j;
    }
  }
  cout << a << ' ' << b << endl;
}
