#include <bits/stdc++.h>
using namespace std;
long long n, m, i, j, k, t, l, r, tmp, ans, one, zero, cnt, curr, flag, mn, mx,
    a, b;
long long arr[1000005], pre[1000005];
vector<long long> brr[1000005], w;
string second;
set<long long> st;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long x;
  cin >> x;
  for (i = sqrt(x) + 1; i >= 1; i--)
    if (x % i == 0) {
      cout << min(i, x / i) << " " << max(i, x / i);
      return 0;
    }
  return 0;
}
