#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int mm = INT_MAX;
  int a, b;
  for (int i = 1; i <= n; ++i) {
    if (n % i != 0) continue;
    int other = n / i;
    if (other - i < mm && other >= i) {
      a = i;
      b = other;
      mm = b - a;
    }
  }
  cout << a << " " << b << '\n';
  return 0;
}
