#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N (1000000000+7) #define M (998244353) #define INF 1e16 typedef long long ll; typedef pair P; ll d[32][32]; ll now[510][510]; ll r[3]={0,1,2}; ll cost[5][35]; int main(){ ll n,x,y,z; cin>>n>>x>>y>>z; vectora(n); ll sum = 0; for(ll i=0;i>a[i]; if(a[i]>=10000){ ll t = a[i]/10000; sum+=t; a[i]-=t*10000; } } if(sum<=z)z-=sum; else{ sum-=z; z=0; sum = 2*sum; if(sum<=y){ y-=sum; } else{ if(y%2==0){ sum-=y; y=0; sum = 5*sum; if(sum<=x)x-=sum; else{ cout<<"No"<=5){ y=0; x-=5; sum-=2; } else{ cout<<"No"<()); for(ll i=0;i0){ z--; a[i]-=10000; continue; } else break; } sum = 0; for(ll i=0;i=5000){ sum++; a[i]-=5000; } } if(sum<=y)y-=sum; else{ sum-=y; y=0; sum = 5*sum; if(sum<=x){ x-=sum; } else{ cout<<"No"<()); for(ll i=0;i0){ y--; continue; } if(a[i]>=0){ if(x<=0){ cout<<"No"<