lis=list(map(int,input().split())) a,b=lis[0],lis[1] for i in range(a,b+1): for j in range(2,i): if i%j==0: break else: print(i)