#include <bits/stdc++.h>
int main() {
  long long int n, b, c, i;
  float a, d;
  scanf("%I64d", &n);
  a = sqrt(n);
  b = floor(a);
  for (i = b; i > 0; i--) {
    d = n % i;
    if (d == 0)
      break;
    else
      continue;
  }
  c = n / i;
  printf("%I64d %I64d", i, c);
}
