import java.util.*; public class Main{ static final int MOD = (int)1e9+7; 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()); int[] c = {z, y, x}; int[] d = {10000, 5000, 1000}; int[] a = new int[n]; for(int i=0; i 0 && a[j] >= 0){ c[i]--; a[j] -= d[i]; } } } boolean ans = true; for(int i=0; i= 0){ ans = false; break; } } System.out.println(ans ? "Yes" : "No"); } public static void rsort(int[] a){ Arrays.sort(a); for(int i=0; i