#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++; ll b = (a+999)/1000; v.emplace_back(b/5,b%5); } sort(ALLOF(v), [](const pair& x, const pair& y){ return x.second x = v[i]; ll a = x.second; ll b = min(a, X); v[i].second -= b; X -= b; } rep(i,N){ if(v[i].second > 0) v[i].first++; } sort(ALLOF(v), [](const pair& x, const pair& y){ return x.first 0) ok = false; } if(ok) cout << "Yes" << endl; else cout << "No" << endl; return 0; }