a,b=list(map(int,input().split())) for i in range(a,b+1): fg=0 for j in range(2,i-1): if i%j==0: fg=1 break if fg==0: print (i)