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