#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int i, j, k;
  int a = 1000000, b = 0;
  int p, q;
  cin >> n;
  j = sqrt(n);
  for (i = 1; i <= j + 1; i++) {
    if (n % i == 0) {
      p = n / i;
      q = i;
      if (abs(p - q) < abs(a - b)) {
        a = max(p, q);
        b = min(p, q);
      }
    }
  }
  cout << b << " " << a;
}
