#!/usr/bin/env python3 import sys input = sys.stdin.readline n, x, y, z = map(int, input().split()) a = [int(item) for item in input().split()] over_five = [] under_five = [] pay_first = 0 for item in a: if item % 1000 != 999: item += 1 pay_first += (item // 10000) * 10000 if item % 10000 >= 5000: over_five.append(item % 10000) elif item % 10000 > 0: under_five.append(item % 10000) payment = min(z*10000, pay_first) z -= payment // 10000; pay_first -= payment payment = min(y*5000, pay_first) y -= payment // 5000; pay_first -= payment payment = min(x*1000, pay_first) x -= payment // 1000; pay_first -= payment if pay_first > 0: print("No") exit() over_five.sort(reverse=True) for i, item in enumerate(over_five): if z > 0: z -= 1 continue if y > 0: y -= 1 under_five.append(item - 5000) continue under_five.append(item) under_five.sort(reverse=True) for item in under_five: if z > 0: z -= 1 continue if y > 0: y -= 1 continue use = (item + 999) // 1000 if x >= use: x -= use else: print("No") exit() print("Yes")