import sys input = sys.stdin.readline N,X,Y,Z=map(int,input().split()) A=list(map(int,input().split())) for i in range(N): A[i]+=1 if A[i]>=10000 and Z>0: s=min(A[i]//10000,Z) Z-=s A[i]-=s*10000 if Z==0: for i in range(N): if A[i]>=5000 and Y>0: s=min(A[i]//5000,Y) Y-=s A[i]-=s*5000 A.sort(reverse=True) #print(A,X,Y,Z) if Z>0: for i in range(N): if A[i]>0 and Z>0: Z-=1 A[i]=0 #print(A,X,Y,Z) if Y>0: for i in range(N): if A[i]>0 and Y>0: Y-=1 A[i]=0 #print(A,X,Y,Z) for i in range(N): if A[i]>0 and X>0: s=min((A[i]+999)//1000,X) X-=s A[i]=0 if max(A)==0: print("Yes") else: print("No")