X,Y = [int(i) for i in input().split()] N = int(input()) A = [int(i) for i in input().split()] lost = 0 for i in range(1,N): if X/3600/A[i-1] < Y/3600/A[i]: lost = 1 if lost == 1: print("NO") else: print("YES")