import sys input = sys.stdin.readline def main(): N, X, Y, Z = map(int, input().split()) *A, = map(int, input().split()) for i in range(N): A[i] += 1 m5000 = [a % 5000 for a in A] I = sorted(range(N), key=lambda i: m5000[i]) for i in I: c = min((m5000[i] + 999) // 1000, X) X -= c A[i] -= c * 1000 Y += X // 5 X %= 5 m10000 = [max(0, a) % 10000 for a in A] I = sorted(range(N), key=lambda i: m10000[i]) for i in I: c = max(0, min((m10000[i] + 4999) // 5000, Y)) Y -= c A[i] -= c * 5000 Z += Y // 2 Y %= 2 for i in range(N): if A[i] <= 0: continue c = min((A[i] + 999) // 1000, X) X -= c A[i] -= c * 1000 c = max(0, min((A[i] + 4999) // 5000, Y)) Y -= c A[i] -= c * 5000 c = max(0, min((A[i] + 9999) // 10000, Z)) Z -= c A[i] -= c * 10000 if A[i] > 0: print('No') return print('Yes') if __name__ == '__main__': main()