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