#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int res = -1, resa = -1, resb = -1;
  for (int i = (1); i <= (n); ++i)
    if (n % i == 0 && i <= n / i) {
      if (res == -1 || (n / i - i) < res)
        res = n / i - i, resa = i, resb = n / i;
    }
  printf("%d %d", resa, resb);
  return 0;
}
