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