#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include using namespace std; #define rep(i, n) for (long long i = 0; i < (long long)(n); i++) using ll = long long; using P = pair; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n,x,y,z; cin >> n >> x >> y >> z; vector a(n); rep(i,n) cin >> a[i]; rep(i,n) a[i] = (a[i] / 1000 + 1) * 1000; vector c{10000,5000,1000}; vector v{z,y,x}; rep(t,3){ int C = c[t],V = v[t]; rep(i,3){ int k = min(a[i] / C,V); a[i] -= C * k; V -= k; } sort(a.rbegin(),a.rend()); rep(i,min(n,V))a[i] = 0; } bool f = true; rep(i,n)if(a[i] != 0)f = false; if(f)cout << "Yes"; else cout << "No"; cout << endl; }