#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int t = sqrt(n * 1.0);
    for (int i = t; i >= 1; i--) {
      if (n % i == 0) {
        cout << i << " " << n / i << endl;
        break;
      }
    }
  }
}
