a,b=map(int,input().split()) for s in range(a,b+1): flag=0 for i in range(2,s): if s%i==0: flag=1 break if flag==0: print (s)