#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, col, row;
  cin >> n;
  col = sqrt(n);
  while (1) {
    if (n % col == 0) {
      int a, b;
      a = n / col;
      b = col;
      if (a >= b)
        cout << b << " " << a << endl;
      else
        cout << a << " " << b << endl;
      break;
    } else
      col++;
  }
  return 0;
}
