#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a = 0, b = 0;
  for (int i = 1; i * i <= n; i++) {
    if (n % i != 0) continue;
    int x = i, y = n / i;
    if (x <= y) {
      if (a == 0) {
        a = x, b = y;
      } else if ((b - a) > (y - x)) {
        a = x, b = y;
      }
    }
  }
  cout << a << " " << b << endl;
}
