N,X,Y,Z=map(int, input().split()) *A,=map(int, input().split()) ans = True for a in A: d = (a + (5000 if a < 5000 else 0)) // 10000 d = min(Z,d) Z -= d m = a - d * 10000 d = (m + (1000 if m < 9000 else 0)) // 5000 d = min(Y,d) Y -= d m -= d * 5000 d = m//1000 + 1 if d <= X: X -= d m -= d * 1000 if m >= 0 and Y > 0: d = m//5000 + 1 if d <= Y: Y -= d m -= d * 5000 if m >= 0 and Z > 0: d = m//10000 + 1 if d <= Z: Z -= d m -= d * 10000 if m >= 0: ans = False break print('Yes' if ans else 'No')