main=do a<-readLn;mapM putStrLn[shows n":"++unwords[show x|x<-[1..n],mod n x<1]|n<-[1..a]]