x, y = map(int, input().split()) n = int(input()) a = list(map(int, input().split())) x *= 1000 y *= 1000 x /= 3600 y /= 3600 flag = True for i in range(n - 1): if a[i] * y > a[i + 1] * x: flag = False if flag: print("YES") else: print("NO")