#include using namespace std; int main() { ios::sync_with_stdio(false); int N, X, Y, Z; { cin >> N >> X >> Y >> Z; } vector A(N); { for (int i = 0; i < N; ++i) cin >> A[i]; } multiset bag(A.begin(), A.end()); { while (bag.size()) { int v = *--bag.end(); bag.erase(--bag.end()); int dz = min(Z, v / 10000); { Z -= dz; v -= dz * 10000; } if (v < 0) continue; if (dz) { bag.insert(v); continue; } int dy = min(Y, v / 5000); { Y -= dy; v -= dy * 5000; } if (v < 0) continue; if (dy) { bag.insert(v); continue; } int64_t tot = (int64_t) X * 1000 + (int64_t) Y * 5000 + (int64_t) Z * 10000; if (tot <= v) { bag.insert(v); break; } if (Z) { --Z; if (X) --X; else if (Y) --Y; else if (Z) --Z; else { bag.insert(v); break; } continue; } if (Y) { --Y; if (X) --X; else if (Y) --Y; { bag.insert(v); break; } continue; } int dx = min(X, (v + 1000) / 1000); { X -= dx; v -= dx * 1000; } assert(v < 0); } } cout << (bag.empty() ? "Yes" : "No") << endl; }