#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int n = 0, x = 0;
  cin >> n;
  x = n;
  for (int a = 2; a * a <= n; a++) n % a == 0 ? x = a : x += 0;
  cout << min(x, n / x) << " " << max(n / x, x);
}
