#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, i;
  cin >> n;
  a = 1;
  b = n;
  for (i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i - i < (b - a)) {
        b = n / i;
        a = i;
      }
    }
  }
  cout << a << " " << b;
}
