#include using namespace std; typedef pair P; typedef long long ll; typedef long double ld; const int inf=1e9+7; const ll longinf=1LL<<60; #define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i ) #define rep(i,n) REP(i,0,n) #define F first #define S second const int mx=8010; const ll mod=1e9+7; int main(){ int n; ll x,y,z; cin >> n >> x >> y >> z; vector a(n); rep(i,n){ cin>>a[i]; a[i]++; } rep(i,n){ ll k = a[i]/10000; a[i] %= 10000; if(z>=k){ z -= k; } else { k -= z; z=0; a[i] += 10000*k; } } sort(a.rbegin(),a.rend()); if(z>0){ rep(i,n){ if(z>0){ a[i]=0; z--; } } } sort(a.rbegin(),a.rend()); rep(i,n)if(a[i]!=0){ ll k = a[i]/5000; a[i] %= 5000; if(y>=k){ y -= k; } else { k -= y; y=0; a[i] += 5000*k; } } sort(a.rbegin(),a.rend()); if(y>0){ rep(i,n){ if(y>0){ a[i]=0; y--; } } } sort(a.rbegin(),a.rend()); rep(i,n)if(a[i]!=0){ ll k = (a[i]+999)/1000; if(x>=k){ x -= k; } else { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }