n,x,y,z = map(int,input().split()) a = [int(i) for i in input().split()] man = 0 li = [0]*10 for i in range(n): a[i] = 1000 + (a[i] // 1000)*1000 tmp = a[i]//10000 man += tmp li[(a[i]-tmp*10000)//1000] += 1 if man <= z: z -= man man = 0 else: man -= z z = 0 if man != 0: if man <= y//2: y -= man*2 man = 0 else: man -= y//2 y = 0 if man != 0: if man*10 <= y*5+x: y = 0 x -= (man*10-5*y)//10 man = 0 else: print("No") exit() for i in range(9,0,-1): if li[i] <= z: z -= li[i] li[i] = 0 else: li[i] -= z z = 0 break for i in range(9,4,-1): if li[i] <= y: li[i-5] += li[i] y -= li[i] li[i] = 0 else: li[i-5] += y y = 0 li[i] -= y if y > 0: for i in range(5): if li[9-i] <= y: li[4-i] += li[9-i] y -= li[9-i] else: li[4-i] += y y = 0 li[9-i] -= y break if y > 0: for i in range(4): if li[4-i] <= y: y -= li[4-i] li[4-i] = 0 else: li[4-i] -= y y = 0 break #print(x,y,z,li) for i in range(9): tmp = 9-i #print(tmp,li[9-i],z) if li[9-i]*tmp <= x: x -= li[9-i]*tmp li[9-i] = 0 else: print("No") exit() print("Yes")