#include <bits/stdc++.h>
int main() {
  int input, max = 0, temp1, temp2;
  scanf("%d", &input);
  for (int i = 1; i <= input; i++) {
    if (input % i == 0) {
      temp1 = input / i;
      temp2 = i;
      if (temp1 <= temp2) {
        break;
      }
    }
  }
  printf("%d %d\n", temp1, temp2);
  return 0;
}
