X,Y = map(int, input().split()) N = input() A = list(map(int, input().split())) for a,b in zip(A,A[1:]): if b*X < a*Y: print('NO') exit() print('YES')