# Haskell, 65

    mapM_ print [n|n<-[2..999999],all((> 0).rem n)[2..n-1]]