#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int a = 1;
  int b = N;
  for (int i = 2; N / i >= i; i++)
    if (N % i == 0) a = i, b = N / i;
  cout << a << ' ' << b << '\n';
}
