#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, d = 1, a, b, kor, m = 1e8;
  cin >> n;
  a = sqrt(n);
  while (d * d <= n) {
    if (n % d == 0 && d + n / d < m) {
      m = d + n / d;
      a = d;
      b = n / d;
    }
    ++d;
  }
  cout << a << ' ' << b;
}
