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