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