#include using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; for (int i=40000;i>=1;--i){ if (n%(i*i)==0){ cout << i << ' ' << n/(i*i) << '\n'; return 0; } } }