#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, n;
  while (~scanf("%lld", &n)) {
    for (long long i = sqrt(n); i > 0; i--) {
      if (n % i == 0) {
        printf("%lld %lld\n", i, n / i);
        break;
      }
    }
  }
}
