#include <bits/stdc++.h>
using namespace std;
int main() {
  int all, mid;
  while (cin >> all) {
    mid = sqrt(all);
    for (int i = mid; i > 0; i--) {
      if (!(all % i)) {
        cout << i << " " << all / i << endl;
        break;
      }
    }
  }
}
