#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a = 0, b = 0;
  cin >> n;
  int min = 100088778678;
  int z = 0;
  int raz = 0;
  int cheak = 0;
  for (int i = 1; i < 500004; i++) {
    if (n % i == 0) {
      z = n / i;
      raz = abs(z - i);
      if (raz < min) {
        cheak = 1;
        if ((z - i) > 0) {
          a = i;
          b = z;
        } else {
          a = z;
          b = i;
        }
        min = raz;
      }
    }
  }
  if (cheak == 1) cout << a << " " << b;
  return 0;
}
