#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  for (int i = sqrt(n); i > 0; i--) {
    if (n % i == 0) {
      cout << i << " " << n / i << endl;
      return 0;
    }
  }
  return 0;
}
