#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a = 1, b = n;
  bool finish = false;
  for (int i = 2; i <= n / 2 and not finish; ++i) {
    if (i <= n / i and i * (n / i) == n) {
      a = i;
      b = n / i;
    }
  }
  cout << a << " " << b << endl;
}
