$,=$";print$_<3||-/^[35]$/||(3x($_&1),6x($_>5),2,4,grep<.>,8..$_)for<>