#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  long long int x = LLONG_MAX, y = LLONG_MAX;
  for (long long int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      long long int lcm = ((i) * (n / i)) / (gcd(i, n / i));
      if (max(x, y) > max(n / i, i) && lcm == n) x = i, y = n / i;
    }
  }
  cout << x << " " << y << endl;
}
