#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const long long infLL = 9000000000000000000;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  int x = 0, y = 0;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      x = i;
      y = n / i;
    }
  }
  cout << x << " " << y << '\n';
  return 0;
}
