#include <bits/stdc++.h>
using namespace std;
bool p[1000010];
int main() {
  for (int i = 2; i <= 50000; i++)
    for (int j = 2; j * i <= 1000000; j++) {
      p[i * j] = 1;
    }
  int n;
  scanf("%d", &n);
  int q = sqrt(n);
  if (p[n] == 0)
    printf("1 %d\n", n);
  else if (q * q == n)
    printf("%d %d\n", q, q);
  else {
    int s, q2 = q;
    bool flag = 0;
    while (1) {
      s = q2 + 1;
      while (1) {
        if (q2 * s == n) {
          flag = 1;
          break;
        } else if (q2 * s > n)
          break;
        else
          s++;
      }
      if (flag)
        break;
      else
        q2--;
    }
    printf("%d %d\n", q2, s);
  }
  return 0;
}
