import java.util.*; public class Main { public static void main(String args[]) { // 入力 Scanner sc = new Scanner(System.in); int n = Integer.parseInt(sc.next()); int x = Integer.parseInt(sc.next()); int y = Integer.parseInt(sc.next()); int z = Integer.parseInt(sc.next()); Integer[] a = new Integer[n]; Arrays.setAll(a, i -> Integer.parseInt(sc.next())); sc.close(); // 主処理 boolean judge = true; for (int price : a) { int count = (int) Math.ceil((price + 1) / 1000.0); while (0 < count) { if (10 <= count) { if (1 <= z) { z--; } else if (2 <= y) { y -= 2; } else if (1 <= y && 5 <= x) { y--; x -= 5; } else if (10 <= x) { x -= 10; } else { judge = false; break; } count -= 10; } else if (5 <= count) { if (1 <= y) { y--; } else if (5 <= x) { x -= 5; } else if (1 <= z) { z--; } else { judge = false; break; } count -= 5; } else { if (count <= x) { x -= count; } else if (1 <= y) { y--; } else if (1 <= z) { z--; } else { judge = false; break; } count = 0; } } } String result = judge ? "Yes" : "No"; // 出力 System.out.println(result); } }