#include using namespace std; typedef long long ll; signed main(){ ll N; cin >> N; for( int i = 2; 1LL * i * i <= N; ++i ) if( N % i == 0 ) cout << i << " " << N / i << endl, exit( 0 ); cout << 1 << " " << N << endl; return 0; }