#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  int a, b;
  for (long long i = 1; i * i < n; i++) {
    if (n % i == 0) a = i, b = n / i;
  }
  if (n != 1)
    cout << a << " " << b << "\n";
  else
    cout << 1 << " " << 1 << "\n";
  return 0;
}
