#include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; typedef unsigned long long ull; int main(){ ll N, X, Y, Z; cin >> N >> X >> Y >> Z; vector v; rep(i,N){ ll a; cin >> a; a++; v.push_back((a+999)/1000); } sort(ALLOF(v),[](const ll& x, const ll& y){ return x%10 > y%10; }); if(Z > 0){ rep(i,N){ ll x = (v[i]+9)/10; ll y = min(x, Z); Z -= y; v[i] -= 10 * y; v[i] = max(0LL, v[i]); } } sort(ALLOF(v),[](const ll& x, const ll& y){ return x%5 > y%5; }); if(Y > 0){ rep(i,N){ ll x = (v[i]+4)/5; ll y = min(x, Y); Y -= y; v[i] -= 5 * y; v[i] = max(0LL, v[i]); } } ll sum = 0; rep(i,N){ sum += v[i]; } if(sum <= X) cout << "Yes" << endl; else cout << "No" << endl; return 0; }