import sys input = sys.stdin.readline sys.setrecursionlimit(100000000) INF = 10 ** 10 MOD = 10 ** 9 + 7 from heapq import heapify,heappop,heappush input = sys.stdin.readline from bisect import bisect_left def to(n): return (n//1000 + 1) * 1000 def main(): n,x,y,z = map(int,input().split()) a = [to(int(i)) for i in input().split()] a.sort(reverse = True) for i in range(n): if z == 0: break if a[i] > 10000: if a[i]//10000 <= z: z -= a[i]//10000 a[i] %= 10000 else: a[i] -= z * 10000 z = 0 if z > 0: a.sort(reverse = True) for i in range(min(z,n)): a[i] = 0 a.sort(reverse = True) for i in range(n): if y == 0: break if a[i] > 5000: if a[i]//5000 <= y: y -= a[i]//5000 a[i] %= 5000 else: a[i] -= y * 5000 y = 0 if y > 0: a.sort(reverse = True) for i in range(min(y,n)): a[i] = 0 for i in range(n): if a[i] > 0: x -= (a[i] + 999)//1000 if x < 0: print('No') else: print('Yes') if __name__ == '__main__': main()