a,b=map(int,raw_input().strip().split()) c=0 for i in range(a,b+1): for j in range(2,i-1): if i % j==0: c=1 if c==0: print i c=0