def read(): N, X, Y, Z = list(map(int, input().split(" "))) A = list(map(int, input().split(" "))) return N, X, Y, Z, A def pay(a, v=1000): d = a % v a = a - d + v if v < 10000: nz = 0 else: nz = a // 10000 a -= nz * 10000 if v < 5000: ny = 0 else: ny = a // 5000 a -= ny * 5000 if v < 1000: nx = 0 else: nx = a // 1000 a -= nx * 1000 return nx, ny, nz def exchange(nx, ny, nz, X, Y, Z, INF=10**9+1): if nz > Z: ny += (nz - Z) * 2 nz -= Z if ny > Y: nx += (ny - Y) * 5 ny -= Y if nx > X: return INF, INF, INF return nx, ny, nz def solve(N, X, Y, Z, A, INF=10**9+1): A = sorted(A, reverse=True) for a in A: nx, ny, nz = pay(a, 1000) nx, ny, nz = exchange(nx, ny, nz, X, Y, Z) if nx == INF: nx, ny, nz = pay(a, 5000) nx, ny, nz = exchange(nx, ny, nz, X, Y, Z) if nx == INF: nx, ny, nz = pay(a, 10000) nx, ny, nz = exchange(nx, ny, nz, X, Y, Z) if nx == INF: return "No" X -= nx Y -= ny Z -= nz return "Yes" if __name__ == "__main__": inputs = read() print("%s" % solve(*inputs))