n,x,y,z=map(int,input().split()) a=list(map(int,input().split())) for i in range(n): if (a[i])>999: pay=int(a[i]//1000+1) while pay>0: if len(str(pay))>1:#10000円より多い if pay<=z: p=pay//10 z-=p pay-=p*10 if pay<=5*y: p=pay//5 y-=p pay-=p*5 if pay<=x: x-=pay pay=-1 else:#10000円未満 if pay<=5*y: p=pay//5 y-=p pay=-1 if pay<=x: x-=pay 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')