#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int t = 1;
  int a, b;
  while (t * t <= n) {
    if (n % t == 0) {
      a = t;
      b = n / a;
    }
    ++t;
  }
  printf("%d %d\n", a, b);
}
