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