p=k=1 exec"if set(`k`)<=set(p%k*'2357'):print k\np*=k;k+=1\n"*9999