#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, i, j, k;
  cin >> N;
  int a, b;
  int diff = 1e8 + 9;
  for (i = 1; i <= sqrt(N); i++) {
    if (N % i == 0) {
      j = i;
      k = N / i;
      if (abs(k - i) < diff) {
        diff = k - j;
        a = j;
        b = k;
      }
    }
  }
  cout << a << " " << b;
  return 0;
}
