input_list = list(map(int,input().split())) x, y = input_list n = int(input()) a_list = list(map(int,input().split())) res = 0 for i in range(n-1): if a_list[i+1] * x < a_list[i] * y: res = 1 break if res == 0: print('YES') else: print('NO')