n, x, y, z = map(int, input().split()) A = list(map(int, input().split())) A = [a // 1000 + 1 for a in A] for i in range(n): mi = min(z, A[i] // 10) A[i] -= mi * 10 z -= mi for i in range(n): mi = min(y, A[i] // 5) A[i] -= mi * 5 y -= mi A.sort(reverse = True) tot = sum(A[y+z:]) if tot <= x: print("Yes") else: print("No")