#include <bits/stdc++.h>
using namespace std;
void lc() { cout << endl; }
long long md(long long n) { return n % 998244353; }
void solve() {
  long long n;
  cin >> n;
  long long a = 1999999999999999999, b = 1999999999999999999;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (max(i, n / i) <= max(a, b)) a = i, b = n / i;
    }
  }
  cout << a << " " << b;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t = 1;
  while (t--) {
    solve();
    lc();
  }
}
