#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  int ans_a = 0;
  int min_diff = 1 << 30;
  for (int i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      if (n / i - i < min_diff) {
        min_diff == n / i - i;
        ans_a = i;
      }
    }
  }
  std::cout << ans_a << " " << n / ans_a << "\n";
  return 0;
}
