import math a,b=list(map(int,input().split())) for i in range(a,b+1): n= 0 for j in range(2,int(math.sqrt(i))+1): if i%j==0: n=1 if n==0: print(i)