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