N, X, Y, Z = map(int, input().split()) A = list(map(int, input().split())) A.sort(reverse=True) for a in A: a += 1 if a >= 10000: t = a // 10000 t = min(t, Z) Z -= t a -= t * 10000 if a >= 5000: t = a // 5000 t = min(t, Y) Y -= t a -= t * 5000 if X != 0: t = (a + 999) // 1000 t = min(t, X) X -= t a -= t * 1000 if a <= 0: continue if Y != 0: t = (a + 4999) // 5000 t = min(t, Y) Y -= t a -= t * 5000 if a <= 0: continue if X != 10000: t = (a + 9999) // 10000 t = min(t, Z) Z -= t a -= t * 10000 if a <= 0: continue print('No') exit() print('Yes')