#include main(){ long long M; scanf("%lld",&M); int num = 1; for(long long i = 2;i*i <= M;i++){ if(M%i==0)num = i; } printf("%d %lld\n",num,M/num); }