#pragma GCC optimize("Ofast") #pragma GCC target("avx2") main(){ long m; scanf("%ld",&m); if((m&1)==0){ printf("2 %ld",m/2); exit(0); } for(long i=-1,a=2;i+=a^=6,i<1000000;){ if(m%i==0){ printf("%ld %ld",i,m/i); exit(0); } } printf("1 %ld",m); }