for(x in 1:scan("stdin")){y=1:x cat(x,":",paste(y[!x%%y],collapse=" ")," ",sep="")}