#include using namespace std; typedef long long ll; typedef pair P; const ll MOD = 1e9+7; const ll INF = 1e18; #define rep(i,m,n) for(ll i = (m); i <= (n); i++) #define zep(i,m,n) for(ll i = (m); i < (n); i++) #define rrep(i,m,n) for(ll i = (m); i >= (n); i--) #define print(x) cout << (x) << endl; #define printa(x,m,n) for(ll i = (m); i <= n; i++){cout << (x[i]) << " ";} cout<> n >> x >> y >> z; ll a[n]; zep(i, 0, n){cin >> a[i];} ll man = 10000; ll go = 5000; ll sen = 1000; zep(i, 0, n){ a[i] -= min(x, a[i]/man)*man; x -= min(x, a[i]/man); } sort(a, a+n); rrep(i, n-1, 0){ if(x > 0 && a[i] >= 0){ a[i] -= man; x--; } } zep(i, 0, n){ a[i] -= min(y, a[i]/go)*go; y -= min(y, a[i]/go); } sort(a, a+n); rrep(i, n-1, 0){ if(y > 0 && a[i] >= 0){ a[i] -= go; y--; } } zep(i, 0, n){ if(a[i] >= 0 && z > 0){ a[i] -= min(y, a[i]/sen+1)*sen; y--; } if(a[i] >= 0){ print("No") return 0; } } print("Yes") return 0; }