#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1000000007;
void solve() {
  long long int n;
  cin >> n;
  for (long long int i = sqrt(n); i > 0; i--) {
    if (n % i == 0 && ((n / i) % i != 0 || i == 1 || i == sqrt(n))) {
      cout << i << " " << n / i << '\n';
      break;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
