#include <bits/stdc++.h>
using namespace std;
int main() {
  int64_t x;
  cin >> x;
  if (x == 1) {
    cout << 1 << "\n";
    return 0;
  }
  double sqrt_x = sqrt((double)x);
  for (int a = (int64_t)sqrt_x - 1; a > 0; --a) {
    if (x % a == 0) {
      cout << a << " " << x / a << "\n";
      return 0;
    }
  }
  return 0;
}
