N,X,Y,Z=map(int, input().split()) *A,=map(lambda x:1+int(x)//1000, input().split()) ans = True for i in range(N): d = min(Z, A[i] // 10) Z -= d A[i] -= 10 * d for i in range(N): d = min(Y, A[i] // 5) Y -= d A[i] -= 5 * d for a in A: if a > 5 and Z > 0: Z -= 1 a -= 10 if a > 1 and Y > 0: Y -= 1 a -= 5 if a > 0: d = min(X,a) X -= d a -= d if a > 0: d = min(Y,1+a//5) Y -= d a -= d*5 if a > 0: d = min(Z,1+a//10) Z -= d a -= d*10 if a > 0: ans = False break print('Yes' if ans else 'No')