# coding: utf-8 # Your code here! N,X,Y,Z=map(int,input().split()) A=list(map(int,input().split())) for i in range(N): temp=min((A[i]//10000),Z) A[i]-=10000*temp Z-=temp for i in range(N): temp=min((A[i]//5000),Y) A[i]-=5000*temp Y-=temp A.sort(reverse=True) for i in range(len(A)): if Z>0 and A[i]>=0: Z-=1 A[i]-=10000 if Y>0 and A[i]>=0: Y-=1 A[i]-=5000 if A[i]<0: continue temp=A[i]//1000+1 A[i]-=temp*1000 X-=temp #print(X,Y,Z) if X<0: print("No") else: print("Yes")