#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
long long int n;
int main() {
  cin >> n;
  long long int tmp = sqrt(n);
  for (long long int i = tmp; i >= 1; i--) {
    if (n % i == 0) {
      cout << i << " " << n / i << endl;
      break;
    }
  }
  return 0;
}
