#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-10;
const long long MOD = 1000000007ll;
const long long mod1 = 1000000009ll;
const long long mod2 = 1100000009ll;
int INF = (int)1e9 + 5;
long long INFINF = (long long)1e18;
int main() {
  int n;
  scanf("%d", &n);
  int a, b, diff;
  diff = INF;
  a = -1;
  b = -1;
  for (int i = 1; i <= n; i++) {
    if (n % i == 0) {
      int a_t, b_t;
      a_t = i;
      b_t = n / i;
      if (abs(a_t - b_t) < diff) {
        diff = abs(a_t - b_t);
        a = min(a_t, b_t);
        b = max(a_t, b_t);
      }
    }
  }
  printf("%d ", a);
  printf("%d\n", b);
  return 0;
}
