#include <bits/stdc++.h>
using namespace std;
unsigned long long int gcd(unsigned long long int a, unsigned long long int b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
unsigned long long int lcm(unsigned long long int a, unsigned long long int b) {
  unsigned long long int x;
  x = (a * b) / gcd(a, b);
  return x;
}
int main() {
  unsigned long long int n, x, y;
  cin >> n;
  unsigned long long int i, a = 9999999999999;
  for (i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (max(i, n / i) <= a && lcm(i, n / i) == n) {
        a = max(i, n / i);
        x = min(i, n / i);
        y = n / x;
      }
    }
  }
  cout << x << " " << y;
  return 0;
}
