x=int(input()) for i in range(2,x+1): n=0 for j in range(2,i): if i%j==0: n=1 break if n==0: print(i)