#!/usr/bin/python m,n=map(int,raw_input().split()) for i in range(m,n+1): j=2 while j<=i/j: if i%j==0: break j=j+1 if j>i/j: print i