#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, z = 1;
  cin >> n;
  y = n;
  for (int i = 1; i < n; i++) {
    if (n % i == 0) {
      x = abs(n / i - n / (n / i));
      if (x < y) {
        z = i;
        y = x;
      } else {
        cout << z << " " << n / z;
        return 0;
      }
    }
  }
  cout << z << " " << n / z;
}
