import sys def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) N,X,Y,Z = MI() A = LI() for i in range(N): A[i] = A[i]//1000+1 for i in range(N): a = A[i]//10 if a <= Z: A[i] -= 10*a Z -= a else: A[i] -= 10*Z Z = 0 if Z: A.sort(reverse=True) for i in range(min(N,Z)): A[i] = 0 for i in range(N): b = A[i]//5 if b <= Y: A[i] -= 5*b Y -= b else: A[i] -= 5*Y Y = 0 if Y: A.sort(reverse=True) for i in range(min(N,Y)): A[i] = 0 if sum(A) <= X: print('Yes') else: print('No')