#pragma GCC optimize("O3") #include #define ll long long #define rep2(i,a,b) for(ll i=a;i<=b;++i) #define rep(i,n) for(ll i=0;i=b;i--) #define pii pair #define pll pair #define pq priority_queue #define pb push_back #define eb emplace_back #define veci vector #define vecll vector #define vecpii vector #define vec2(a,b) vector(a,vec(b)) #define vec2ll(a,b) vector(a,vecll(b)) #define vec3(a,b,c) vector>(a,vec2(b,c)) #define vec3ll(a,b,c) vector>(a,vec2ll(b,c)) #define fi first #define se second #define all(c) begin(c),end(c) #define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); #define lb(c,x) distance(c.begin(),lower_bound(all(c),x)) #define ub(c,x) distance(c.begin(),upper_bound(all(c),x)) using namespace std; int in() {int x;cin>>x;return x;} ll lin() {ll x;cin>>x;return x;} template inline bool chmax(T& a,T b){if(a inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;} template inline void print(pair p){cout<<"("< inline void print(vector> v){for(auto e:v)print(e); cout< inline void print(T v){for(auto e:v)cout< istream& operator >> (istream& is, vector& vec){ for(T& x:vec) is >> x; return is; } const ll mod=1e9; int main() { ll n,x,y,z; cin >> n >> x >> y >> z; vector a(n); rep(i,n){ cin >> a[i]; } rep(i,n){ a[i]++; } sort(a.rbegin(),a.rend()); rep(i,n){ if(z==0) break; ll p=a[i]/10000; ll q=min(p,z); a[i]-=q*10000; z-=q; } sort(a.rbegin(),a.rend()); rep(i,n){ if(z==0) break; if(a[i]>0){ a[i]-=10000; z--; } } sort(a.rbegin(),a.rend()); rep(i,n){ if(y==0) break; ll p=a[i]/5000; ll q=min(p,y); a[i]-=q*5000; y-=q; } sort(a.rbegin(),a.rend()); rep(i,n){ if(y==0) break; if(a[i]>0){ a[i]-=5000; y--; } } sort(a.rbegin(),a.rend()); rep(i,n){ if(x==0) break; ll p=a[i]/1000; ll q=min(p,x); a[i]-=q*1000; x-=q; } sort(a.rbegin(),a.rend()); rep(i,n){ if(x==0) break; if(a[i]>0){ a[i]-=5000; x--; } } bool ok=true; rep(i,n){ if(a[i]>0){ ok=false; break; } } if(ok) cout << "Yes" << endl; else cout << "No" << endl; return 0; }