#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n;
  a = sqrt(n);
  while (n % a != 0) {
    a++;
  }
  if (a > n / a) {
    a = n / a;
  }
  cout << a << " " << n / a;
}
