from math import floor n,x,y,z=map(int,input().split()) a=list(map(int,input().split())) a.sort() if len(a)0: x-=1 elif y>0: y-=1 elif z>0: z-=1 else: print('No') exit() elif 1000<=aa<5000: d=floor(aa/1000)+1 if x-d>0: x-=d if y>0: y-=1 elif z>0: z-=1 else: print('No') exit() elif y>0: y-=1 elif z>0: z-=1 else: print('No') exit() elif 5000<=aa<10000: d=floor(aa/1000)+1 if x-d>0: x-=d aa-=1000*d if aa>0: e=floor(aa/5000)+1 if y-e>0: y-=1 elif z>0: z-=1 else: print('No') exit() elif aa>10000: d=floor(aa/1000)+1 if x-d>0: x-=d aa-=1000*d if aa>0: e=floor(aa/5000)+1 if y-e>0: aa-=5000*e y-=e if aa>0: f=floor(aa/10000)+1 if aa>0: if z-f>0: aa-=10000*f z-=f else: print('No') exit() print('Yes')