def sushu(n): for j in range(2,n): if n % j == 0: return 0 return 1 a,b=map(int,input().split()) for i in range(a,b+1): if sushu(i)==1: print(i)