#include <bits/stdc++.h>
using namespace std;
int main() {
  int input, read, count = 0, i, result;
  cin >> read;
  result = sqrt(read);
  for (i = result; i >= 1; i--) {
    if (read % i == 0) {
      cout << i << " " << read / i << endl;
      break;
    }
  }
  return 0;
}
