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