import math
x = int(input())
def peime(x):
if x<3:
return False
for i in range(2,int(sqrt(x)+1)):
if x%i==0:
return False
return True
for i in range(x+1):
if peime(i):
print(i)
//根据题目不同,如果i*i会爆int,要开longlong