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