#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  scanf("%lld", &n);
  long long int m = sqrt(n);
  if (m * m == n) {
    printf("1 %lld\n", n);
    return 0;
  }
  for (long long int i = m; i >= 1; i--) {
    if (n % i == 0) {
      printf("%lld %lld\n", i, n / i);
      return 0;
    }
  }
}
