from heapq import heappush, heappop, heapify def f(m, unit, cnt): if m >= unit and cnt > 0: d = min(cnt, m // unit) return m - (unit * d), cnt - d # 支払えない return m, cnt 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 } while q: m = -heappop(q) assert m > 0 for u in [10_000, 5_000, 1_000]: if m >= u and freq[u] > 0: m2, cnt = f(m, u, freq[u]) freq[u] = cnt if m2 > 0: heappush(q, -m2) break if freq[u] > 0: freq[u] -= 1 break else: print('No') exit() print('Yes')