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