#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int x, i = 0, j = 0, k = 0, z = 0, ij = 0, ik = 0;
  cin >> x;
  long long int a[x], b[x], c[x];
  for (j = 0, i = 1; i <= x; i++) {
    if (x % i == 0) {
      a[j] = i;
      j++;
    }
  }
  k = j;
  for (ij = 0, i = 0; i < k; i++) {
    for (j = i + 1; j < k; j++) {
      if (a[i] * a[j] == x) {
        b[ij] = a[i];
        c[ij] = a[j];
        ij++;
      }
    }
  }
  k = b[0] + c[0];
  z = ij;
  for (i = 0; i < z; i++) {
  }
  for (i = 1; i < z; i++) {
    if (k >= (b[i] + c[i])) {
      ik = i;
      k = b[i] + c[i];
    }
  }
  cout << b[ik] << " " << c[ik] << endl;
  return 0;
}
