#!/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: pay_first += (item // 10000) * 10000 if item % 10000 >= 5000: over_five.append(item % 10000) elif item % 10000 > 0: under_five.append(item % 10000) else: under_five.append(1) payment = min(z*10000, pay_first) z -= payment // 10000; pay_first -= payment payment = min(y*5000, pay_first) y -= payment // 50000; pay_first -= payment payment = min(y*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 over_five: if z > 0: z -= 1 continue if y > 0: y -= 1 under_five.append(item - 5000) 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")