m,n=list(map(int,input().split())) i=m while i<=n: k=2 while k<i: if i%k!=0: k+=1 continue else: break if k==i: print(i) i+=1