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