#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a % b == 0) return (b);
  return (gcd(b, a % b));
}
int main() {
  long long int x, a = 1, b = 1, n1, n2;
  cin >> x;
  for (int i = 1; i <= (int)floor(sqrt(x)); i++) {
    if (x % i != 0) continue;
    n1 = i, n2 = x / i;
    if (((n1 * n2) / gcd(n2, n1)) == x) a = n1, b = n2;
  }
  cout << a << " " << b << endl;
  return (0);
}
