N, X, Y, Z = map(int,input().split()) A = list(map(int,input().split())) B = [] C = [] for i in A: if i >= 10000: temp = i//10000 if Z >= temp: B.append(i - temp*10000) Z -= temp else: B.append(i) else: B.append(i) B.sort(reverse = True) if Z >= 0: B = B[Z:] for i in B: if i >= 5000: temp = i//5000 if Y >= temp: C.append(i - temp*5000) Y -= temp else: C.append(i) else: C.append(i) C.sort(reverse = True) if Y >= 0: C = C[Y:] for i in C: X -= i//1000 + 1 if X >= 0 and Y >= 0 and Z >= 0: print("Yes") else: print("No")