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) def diff(a): x, y, z = calc(a) return 1000 * x + y * 5000 + z * 10000 - a >= 1000 A.sort(key=lambda a: diff(a) - a, reverse=True) while A and sen > 0: a = A[-1] x, y, z = calc(a) if 1000 * x + y * 5000 + z * 10000 - a >= 1000: break A.pop() if x == -1: print('No') exit() sen -= x gosen -= y man -= z A.sort(key=lambda a: diff(a) - a, reverse=True) while A and gosen > 0: a = A[-1] x, y, z = calc(a) if 1000 * x + y * 5000 + z * 10000 - a >= 5000: break A.pop() if x == -1: print('No') exit() sen -= x gosen -= y man -= z A.sort(reverse=True) while A and gosen > 0: a = A.pop() x, y, z = calc(a) if x == -1: print('No') exit() sen -= x gosen -= y man -= z print('Yes')