# problem 3 import math import heapq N, X, Y, Z = map(int, input().split()) A = list(map(int, input().split())) B = [] for num in A: B.append(-num-1) heapq.heapify(B) flag = True # 10000円処理のケース while flag and B: x = heapq.heappop(B)*(-1) if x < 10000: flag = False heapq.heappush(B, -x) continue elif x >= 10000: u, v = divmod(x, 10000) if u < Z: Z -= u heapq.heappush(B, -v) continue elif u >= Z: x -= Z*10000 Z=0 heapq.heappush(B, -x) flag = False if not B: print("Yes") exit() flag = True # 5000円のケース while flag and B: x = heapq.heappop(B)*(-1) if x < 5000: flag = False heapq.heappush(B, -x) continue elif x >= 5000: u, v = divmod(x, 5000) if u < Y: Y -= u heapq.heappush(B, -v) continue elif u >= Y: x -= Y*5000 Y=0 heapq.heappush(B, -x) flag = False if not B: print("Yes") exit() # 1000円の場合 flag = True judge = True Left=Y+Z while B and flag: x = heapq.heappop(B)*(-1) if Left > 0: Left -= 1 continue else: u = math.ceil(x/1000) if X >= u: X -= u continue else: flag = False judge = False continue if judge: print("Yes") else: print("No")