def sushu(max):
dic=[]
for n in range(2,max):
flag=0
for i in range(2,n):
if n%i==0:
flag=1
if flag==0:
dic.append(n)
print(dic)
n=input()
n=int(n)
sushu(n)
def sushu(max):
dic=[]
for n in range(2,max):
flag=0
for i in range(2,n):
if n%i==0:
flag=1
if flag==0:
dic.append(n)
print(dic)
n=input()
n=int(n)
sushu(n)