n,x,y,z=map(int,input().split()) a=list(map(int,input().split())) b=[0]*n for i in range(n): if int(a[i])>999: pay=int(a[i]//1000+1) while pay>0: if len(str(pay))>1: if pay<=z: p=pay//10 z-=p pay-=p if pay<=5*y: p=pay//5 y-=p pay-=p if pay<=x: x-=pay pay=-1 else: if pay<=x: x-=pay pay=-1 if pay<=5*y: p=pay//5 y-=p pay=-1 if pay<=z: p=pay//10 z-=p pay=-1 a[i]=pay if pay >0: break else: if x>0: x-=1 a[i]=-1 elif y>0: y-=1 a[i]=-1 elif z>0: z-=1 a[i]=-1 else: break if all(elem < 0 for elem in a): print('Yes') else: print('No')