#include <bits/stdc++.h>
int main() {
  int n, i, r, c;
  scanf("%d", &n);
  int min = n;
  for (i = 1; i <= (int)sqrt(n); i++) {
    if (n % i == 0) {
      if ((n / i) - (i) >= 0 && (n / i) - (i) < min) {
        r = i;
        c = n / i;
        min = (n / i) - (i);
      }
    }
  }
  printf("%d %d\n", r, c);
  return 0;
}
