N, sen, gosen, man = map(int, input().split()) A = list(map(int, input().split())) def calc(a): if sen * 1000 + gosen * 5000 + man * 10000 <= a: return (-1, -1, -1) x = a m = min(man, x // 10000) x -= m * 10000 g = min(gosen, x // 5000) x -= g * 5000 s = min(sen, x // 1000) x -= s * 1000 if x < 1000 and sen - s > 0: return (s + 1, g, m) if x < 5000 and gosen - g > 0: x -= 5000 while x + 1000 < 0 and s > 0: x += 1000 s -= 1 return (s, g + 1, m) x -= 10000 while x + 5000 < 0 and g > 0: x += 5000 g -= 1 while x + 1000 < 0 and s > 0: x += 1000 s -= 1 return (s, g, m + 1) for a in A: x, y, z = calc(a) if x == -1: print('No') exit() sen -= x gosen -= y man -= z print('Yes')