#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sq = sqrt(n);
  if (n % sq == 0) {
    cout << sq << ' ' << n / sq;
  } else {
    int i = 0;
    while (++i) {
      if (n % (sq - i) == 0) {
        cout << sq - i << ' ' << n / (sq - i);
        break;
      } else if (n % (sq + i) == 0) {
        cout << sq + i << ' ' << n / (sq + i);
        break;
      }
    }
  }
  return 0;
}
