x, y = map(int, input().split()) n = int(input()) a = list(map(int, input().split())) x = x*10 / 36 y = y*10 / 36 for i in range(n-1): t = a[i] / x yl = t * y if yl > a[i+1]: print('NO') break else: print('YES')