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