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 c = min((A[i] - 1) // 10000, Z) Z -= c A[i] -= c * 10000 A.sort(reverse=True) for i in range(N): c = min((A[i] + 9999) // 10000, Z) Z -= c A[i] -= c * 10000 for i in range(N): if A[i] <= 0: continue c = min((A[i] - 1) // 5000, Y) Y -= c A[i] -= c * 5000 A.sort(reverse=True) for i in range(N): if A[i] <= 0: continue c = min((A[i] + 4999) // 5000, Y) Y -= c A[i] -= c * 5000 for i in range(N): if A[i] <= 0: continue c = min((A[i] + 999) // 1000, X) X -= c A[i] -= c * 1000 if A[i] > 0: print('No') return print('Yes') if __name__ == '__main__': main()