#include <bits/stdc++.h>
using namespace std;
int n, a, oka, okb, mn = 2e9;
int main() {
  scanf("%d", &n);
  for (int i = 1; i * i <= n; ++i) {
    if (n % i != 0) continue;
    a = n / i;
    if (mn > a - i) {
      mn = a - i;
      oka = i;
      okb = a;
    }
  }
  printf("%d %d", oka, okb);
  return 0;
}
