#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  scanf("%d", &n);
  j = (int)(sqrt(n));
  for (i = j; i <= n; i++) {
    if (n % i == 0) {
      printf("%d %d\n", min(n / i, i), max(n / i, i));
      break;
    }
  }
  return 0;
}
