use bigint;<>=~$";$|++?($z*=++$$_+$')/=$$_:($z=1)for`factor $\`|fmt -0`;print$z%=1e9+7