#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]; } sort(a.begin(),a.end(),greater()); for(ll i=0;i=10000){ ll k = a[i]/10000; if(z>=k){ z-=k; a[i]-=10000*k; } else{ z=0; a[i]-=10000*z; } } else break; } } sort(a.begin(),a.end(),greater()); for(ll i=0;i=0){ a[i]-=10000; z--; } } sort(a.begin(),a.end(),greater()); for(ll i=0;i=5000){ ll k = a[i]/5000; if(y>=k){ y-=k; a[i]-=5000*k; } else{ y=0; a[i]-=5000*z; } } else break; } } sort(a.begin(),a.end(),greater()); for(ll i=0;i=0){ a[i]-=5000; y--; } } sort(a.begin(),a.end(),greater()); for(ll i=0;i=1000){ ll k = a[i]/1000+1; if(y>=k){ y-=k; a[i]-=1000*k; } else{ y=0; a[i]-=1000*z; } } else{ a[i]-=1000; y--; } } } for(ll i=0;i=0){ cout<<"No"<