I=input;x,y=map(int,I().split());I();a=list(map(int,I().split())) for v,w in zip(a,a[1:]):b=[b,'NO'][w*x