import copy # 入力 N, X, Y, Z = map(int, input().split()) a = list(map(int, input().split())) a = [i // 1000 + 1 for i in a] a = sorted(a, reverse=True) # 10000円 ans = True tmp = [] for i in a: if Z > 0: if i // 10 > Z: tmp.append(i - 10 * Z) Z = 0 else: tmp.append(i % 10) Z -= i // 10 else: tmp.append(i) tmp.sort() if Z > 0: tmp = tmp[:len(tmp) - Z] a = tmp tmp = [] for i in a: if Y > 0: if i // 5 > Y: tmp.append(i - 5 * Y) Y = 0 else: tmp.append(i % 5) Y -= i // 5 else: tmp.append(i) tmp.sort() if Y > 0: tmp = tmp[:len(tmp) - Y] a = tmp tmp = [] for i in a: if X < 0: ans = False break if X > 0: X -= i if X < 0: ans = False print('Yes' if ans else 'No')