#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n;
  a = sqrt(n);
  if (a * a == n)
    cout << a << ' ' << a;
  else {
    while (n % a != 0) {
      --a;
    }
    if (a == 1)
      cout << a << ' ' << n;
    else
      cout << a << ' ' << n / a;
  }
  return 0;
}
