import java.io.PrintWriter; import java.util.*; public class Main { Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main().run(); } void run() { int n = sc.nextInt(); int x = sc.nextInt(); int y = sc.nextInt(); int z = sc.nextInt(); int[] arr = new int[n]; for (int i=0; i0) { x--; continue label; } else if (y>0) { y--; continue label; } else if (z>0) { z--; continue label; } else if (z<=0) { System.out.print("No"); return; } } else if (1<=div) { if (0=div+1) { x -= (div+1); } else { price -= x*1000; x = 0; } if (y>=tmp+1) { y -= (tmp+1); continue label; } else { price -= y*5000; y = 0; if (price<=0) continue label; } } if (5000<=price) { if (price<10000) { z--; continue label; } else { int tmp = price / 10000; if (z>=tmp+1) { z -= (tmp+1); continue label; } else { System.out.print("No"); // System.out.print("here"); return; } } } } } System.out.print("Yes"); } }