#include <bits/stdc++.h>
using namespace std;
int lcm(int a, int b) {
  if (max(a, b) % min(a, b) == 0)
    return max(a, b);
  else
    return a * b;
}
int main() {
  long long int i, n, maxi = INT_MAX, t, a, b;
  cin >> n;
  vector<pair<int, int> > pv;
  for (i = 1; i <= sqrt(n); i++) {
    if (n % i == 0 && lcm(i, n / i) == n) {
      t = max(i, n / i);
      if (maxi > t) maxi = t;
    }
  }
  a = n / maxi;
  b = maxi;
  cout << a << " " << b;
}
