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