n,x,y,z = map(int,input().split()) a = list(map(lambda x:int(x)+1,input().split())) b = [] for i in a: p,q = divmod(i, 1000) if q: p += 1 b.append(p) for i in b: yukichi = min(i // 10, z) z -= yukichi i -= yukichi * 10 higuchi = min(i // 5, y) y -= higuchi i -= higuchi * 5 if i > x: md = i % 10 if md >= 5: if y > 0 and x >= md - 5: y -= 1 x -= md - 5 elif z > 0: z -= 1 elif y > 1: y -= 2 else: print('No') exit(0) else: if x >= md: x -= md elif y > 0: y -= 1 elif z > 0: z -= 1 else: print('No') exit(0) mm = i // 10 ok = min(mm, z) z -= ok mm -= ok if 2 * mm > y: print('No') exit(0) y -= mm // 2 else: x -= i print('Yes')