#include <bits/stdc++.h>
int main() {
  int a, b, x, mid;
  scanf("%d", &x);
  mid = (sqrt(x) + 0.5);
  if (mid * mid == x) {
    a = b = mid;
  } else {
    for (int i = mid; i < x; i++) {
      if (x % i == 0) {
        a = i;
        break;
      }
    }
    b = x / a;
  }
  printf("%d %d\n", a, b);
  return 0;
}
