from heapq import heapify, heappop, heappush N, X, Y, Z = map(int, input().split()) A = list(map(int, input().split())) amounts = [Z, Y, X] bills = [10000, 5000, 1000] A = [-a for a in A] heapify(A) for i in range(3): a = amounts[i] b = bills[i] while A: if a == 0: break x = -heappop(A) if x >= b: t = min(x // b, a) a -= t x -= b * t heappush(A, -x) else: a -= 1 if len(A) == 0: print('Yes') else: print('No')