#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const int MOD = 1e9 + 7;
const int oo = MOD;
long long gcd(long long x, long long y) { return !y ? x : gcd(y, x % y); }
const int mx = 2e6 + 5;
int main() {
  long long n, x, y;
  cin >> n;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) x = i, y = n / i;
  }
  if (x > y) swap(x, y);
  cout << x << " " << y << '\n';
  return 0;
}
