#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 1;
const int MOD = 1e9 + 7;
class Problem {
 public:
  int N, Q, t, k, d;
  char ch;
  string S;
  void solve(std::istream& input, std::ostream& output);
};
void Problem::solve(std::istream& input, std::ostream& output) {
  input >> N;
  for (int i = sqrt(N); i >= 1; i--) {
    if (N % i == 0) {
      output << i << " " << N / i;
      exit(0);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  std::istream& input(std::cin);
  std::ostream& output(std::cout);
  input.tie(0);
  Problem _A;
  _A.solve(input, output);
  return 0;
}
