main(i,n,k){for(scanf("%d%d",&n,&k);n%++i;);printf("%d %d",n-i,i=n/i);}