from heapq import heappush, heappop, heapify N, X, Y, Z = map(int, input().split()) A = list(map(int, input().split())) x, y, z = X, Y, Z q = [-a for a in A] heapify(q) freq = { 1_000: X, 5_000: Y, 10_000: Z } for u in [10_000, 5_000, 1_000]: while q and freq[u] > 0: m = -heappop(q) assert m >= 0 if m >= u: d = min(m // u, freq[u]) m2 = m - (u * d) freq[u] -= d heappush(q, -m2) else: freq[u] -= 1 if q: print('No') else: print('Yes')