import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int X = sc.nextInt(); int Y = sc.nextInt(); int Z = sc.nextInt(); int less = -1; int ans[] = new int[3]; int[] list = new int[N]; for (int i = 0; i < N; i++) { list[i] = sc.nextInt(); ans[0]=0; ans[1]=0; ans[2]=0; less = 0; //1000&5000&10000 for (int c = 0; c <= X; c++) { for (int d = 0; d <= Y; d++) { for (int e = 0; e <= Z; e++) { if (1000 * c + 5000 * d + 10000 * e > list[i]) { if(less == 0) { less = 1000 * c + 5000 * d + 10000 * e; ans[0] = c; ans[1] = d; ans[2] = e; break; }else { if (less > 1000 * c + 5000 * d + 10000 * e) { less = 1000 * c + 5000 * d + 10000 * e; ans[0] = c; ans[1] = d; ans[2] = e; break; } } } } } } if(less == 0) { System.out.println("No"); break; } X = X - ans[0]; Y = Y - ans[1]; Z = Z - ans[2]; } if(less != 0) { System.out.println("Yes"); } } }