x, y = map(int, input().split()) n = int(input()) p = list(map(int, input().split())) def f(x, y, n, p): x_s = x / 60 / 60 y_s = y / 60 / 60 for i in range(n - 1): if y_s * (p[i] / x_s) > p[i+1]: return 'NO' return ('YES') print(f(x, y, n, p))