#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    for (int i = sqrt(n + 0.5); i >= 1; i--) {
      if (n % i == 0) {
        printf("%d %d\n", min(n / i, i), max(n / i, i));
        break;
      }
    }
  }
  return 0;
}
