# verification-helper: PROBLEM https://yukicoder.me/problems/no/1015 n, x, y, z = map(int, input().split()) a = list(map(int, input().split())) for i in range(n): while a[i] > 0: if a[i] > 5000 and z >= 1: a[i] -= 10000 z -= 1 elif a[i] > 1000 and y >= 1: a[i] -= 5000 y -= 1 elif x >= 1: a[i] -= 1000 x -= 1 else: exit(print('No')) print('Yes')