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