from heapq import * from collections import deque import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def SI(): return sys.stdin.readline()[:-1] def main(): n,x,y,z=MI() aa=LI() for i in range(n): c=aa[i]//10000 c=min(c,x) aa[i]-=10000*c x-=c if x==0:break aa.sort(reverse=True) while aa and aa[-1]==0:aa.pop() aa=aa[x:] for i in range(len(aa)): c=aa[i]//5000 c=min(c,y) aa[i]-=5000*c y-=c if y==0:break aa.sort(reverse=True) while aa and aa[-1]==0:aa.pop() aa=aa[y:] for a in aa: c=a//1000+1 z-=c if z<0: print("No") exit() print("Yes") main()