#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m = 0x3f3f3f3f, a, b;
  cin >> n;
  if (n == 1)
    cout << 1 << " " << 1 << endl;
  else {
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= n; j++) {
        int ans = i * j;
        if (ans > n)
          break;
        else if (ans == n) {
          int ma = max(i, j);
          if (ma < m && i != j) {
            m = ma;
            a = i;
            b = j;
          }
        }
      }
    }
    cout << a << " " << b << endl;
  }
  return 0;
}
