import sys sys.setrecursionlimit(10 ** 7) read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N, X, Y, Z = map(int, input().split()) A = list(map(int, input().split())) A.sort() for i in range(N): if Z == 0: break a = A[i] man = a // 10000 if man == 0: continue num = man if man <= Z else Z A[i] -= num * 10000 Z -= num for i in range(N): if Y == 0: break a = A[i] gosen = a // 5000 if gosen == 0: continue num = gosen if gosen <= Y else Y A[i] -= num * 5000 Y -= num A.sort(reverse=True) #print("A", A) #print("XYZ", X, Y, Z) for i in range(N): a = A[i] if a == 0: a = 1 if Z > 0: man = -(-a // 10000) num = man if man <= Z else Z a -= num * 10000 Z -= num if a > 0 and Y > 0: gosen = -(-a // 5000) num = gosen if gosen <= Y else Y a -= num * 5000 Y -= num if a > 0 and X > 0: sen = -(-a // 1000) num = sen if X <= sen else X a -= num * 1000 X -= num if a >= 0: print('No') exit() if X < 0 or Y < 0 or Z < 0: print('No') exit() print('Yes') exit()