#include using namespace std; typedef long long int ll; int N, X, Y, Z; int A[100010]; int main(){ scanf("%d %d %d %d", &N, &X, &Y, &Z); for(int i = 0; i < N; i++){ scanf("%d", &A[i]); A[i]++; } for(int i = 0; i < N; i++){ int num = A[i] / 10000; if(num <= Z){ Z -= num; A[i] -= num * 10000; } } for(int i = 0; i < N; i++){ int num = A[i] / 5000; if(num <= Y){ Y -= num; A[i] -= num * 5000; } } sort(A, A + N); for(int i = 0; i < N; i++){ int num = (A[i] % 1000 == 0 ? A[i] / 1000 : A[i] / 1000 + 1); num = min(num, X); X -= num; A[i] -= num * 1000; A[i] = max(0, A[i]); num = (A[i] % 5000 == 0 ? A[i] / 5000 : A[i] / 5000 + 1); num = min(num, Y); Y -= num; A[i] -= num * 5000; A[i] = max(0, A[i]); num = (A[i] % 10000 == 0 ? A[i] / 10000 : A[i] / 10000 + 1); num = min(num, Z); Z -= num; A[i] -= num * 10000; A[i] = max(0, A[i]); if(A[i] > 0){ printf("No\n"); return 0; } } printf("Yes\n"); return 0; }