#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int lim = (int)sqrt(n);
  int val;
  for (int i = 1; i <= lim; i++) {
    if (n % i == 0) val = i;
  }
  cout << val << " " << n / val << "\n";
  return 0;
}
