import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import numpy as np X,Y = map(int,readline().split()) N = int(readline()) A = np.array(read().split(),np.int64) T1 = A / X T2 = A / Y eps = 10**(-5) condition = np.all(T1[:-1] < T2[1:]+eps) answer = 'YES' if condition else 'NO' print(answer)