#!/usr/bin/env python3 from typing import * def foo(k, value, a): for i in range(len(a)): delta = min(k, a[i] // value) k -= delta a[i] -= delta * value a.sort() while k and a: assert a[-1] < value k -= 1 a.pop() def solve(n: int, x: int, y: int, z: int, a: List[int]) -> bool: foo(z, 10000, a) foo(y, 5000, a) foo(x, 1000, a) return not a # generated by online-judge-template-generator (https://github.com/kmyk/online-judge-template-generator) def main(): import sys tokens = iter(sys.stdin.read().split()) N = int(next(tokens)) X = int(next(tokens)) Y = int(next(tokens)) Z = int(next(tokens)) A = [None for _ in range(N)] for i in range(N): A[i] = int(next(tokens)) assert next(tokens, None) is None ans = solve(N, X, Y, Z, A) print(ans and 'Yes' or 'No') if __name__ == '__main__': main()