#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  pair<int, int> p = {-1, -1};
  int mn = N;
  for (int x = 1; x <= sqrt(N); x++)
    if (N % x == 0) {
      pair<int, int> p1 = {x, N / x};
      if (p1.second - p1.first < mn) mn = p1.second - p1.first, p = p1;
    }
  cout << p.first << " " << p.second << "\n";
}
