main=mapM_(putStrLn.tail.init.show)[(p,q)|p<-t,q<-t,p+2==q] t=s[3,5..2000] s(p:r)=p:s[q|q<-r,q`mod`p>0] s k=k