N, X, Y, Z = map(int,input().split()) A = list(map(int,input().split())) B = [] C = [] for i in A: temp = min(i//10000, Z) B.append(i - temp*10000) Z -= temp B.sort(reverse = True) if Z >= 0: B = B[Z:] for i in B: temp = min(i//5000, Y) C.append(i - temp*5000) Y -= temp 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")