#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a, b;
  cin >> n;
  for (a = sqrt((double)n); a >= 1; a--) {
    if (n % a == 0) {
      b = n / a;
      break;
    }
  }
  cout << a << " " << b << endl;
  return 0;
}
