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