X,Y = map(int,input().split()) N = int(input()) As = [int(x) for x in input().split()] x = X / 3600 * 1000 y = Y / 3600 * 1000 for i in range(N - 1): y_pos=As[i]/x*y if y_pos > As[i+1]: print("NO") break else: print("YES")