#include"bits/stdc++.h" using namespace std; #define REP(k,m,n) for(int (k)=(m);(k)<(n);(k)++) #define rep(i,n) REP((i),0,(n)) using ll = long long; using pii = pair; using pll = pair; using tp3 = tuple; using Mat = vector>; constexpr int INF = 1 << 28; constexpr ll INFL = 1ll << 60; constexpr int dh[4] = { 0,1,0,-1 }; constexpr int dw[4] = { -1,0,1,0 }; bool isin(const int H, const int W, const int h, const int w) { return 0 <= h && h < H && 0 <= w && w < W; } template T minch(T& l, T r) { return l = min(l, r); } template T maxch(T& l, T r) { return l = max(l, r); } template void output(const T& val) { cout << val << endl; } template void output(const vector& vec, const bool newline = false) { for (const T& val : vec)cout << val << (newline ? '\n' : ' '); cout << endl; } template void output(const vector>& mat) { for (const auto& row : mat)output(row); } // ============ template finished ============ void use_bill(priority_queue& pq, ll cnt, ll price) { while (!pq.empty() && cnt > 0) { ll now = pq.top(); pq.pop(); ll use = now / price; if (use == 0) { cnt--; } else { use = min(use, cnt); cnt -= use; now -= use * price; pq.push(now); } } } int main() { ll N, X, Y, Z; cin >> N >> X >> Y >> Z; priority_queue pq; rep(i, N) { ll tmp; cin >> tmp; pq.push(tmp); } use_bill(pq, Z, 10000); use_bill(pq, Y, 5000); use_bill(pq, X, 1000); output(pq.empty() ? "Yes" : "No"); return 0; }