#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  int f = 0;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      a[f] = i;
      f++;
    }
  }
  int h = 0;
  int j;
  for (int i = 0; i < f; i++) {
    for (j = 0; j <= f / 2; j++) {
      if (a[i] * a[j] == n) {
        h++;
      }
    }
    if (h != 0) {
      cout << a[i] << " " << a[j - 1];
      break;
    }
  }
  return 0;
}
