m=list(map(int,input().split())) a=m[0] b=m[1] for num in range(a,b+1): for i in range(2,num-1): if num%i==0: break else: print(num)