n, *bill_cnt = map(int, input().split()) bill_money = [1000, 5000, 10000] arr = [a + 1 for a in map(int, input().split())] arr.sort(reverse=True) for i in reversed(range(3)): cnt = bill_cnt[i] money = bill_money[i] for j in range(n): if arr[j] > 0: use_cnt = min(arr[j] // money, cnt) cnt -= use_cnt arr[j] -= use_cnt * money arr.sort(reverse=True) for j in range(n): if cnt > 0: cnt -= 1 arr[j] -= money arr.sort(reverse=True) print("Yes" if arr[0] <= 0 else "No")