p=i=1 exec"if not`i`.strip(p%i*'2357'):print i\np*=i;i+=1\n"*7777