A,B=map(int, input().split()) c=200 D=[1]*c D[0]=0 D[1]=0 for i in range(2,c): if D[i]==1: d=i while d+i