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