P=[1 for i in range(10**5+200)] P[0]=0 P[1]=0 for i in range(2,len(P)): if P[i]==1: for j in range(2,len(P)): if i*j