#include #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { int N, X, Y, Z; cin >> N >> X >> Y >> Z; priority_queue A; rep(i, N) { int a; cin >> a; A.push(++a); } while (!A.empty() && Z > 0) { int a = A.top(); A.pop(); a -= 10000; if (a > 0) A.push(a); --Z; } while (!A.empty() && Y > 0) { int a = A.top(); A.pop(); a -= 5000; if (a > 0) A.push(a); --Y; } while (!A.empty() && X > 0) { int a = A.top(); A.pop(); a -= 1000; if (a > 0) A.push(a); --Y; } if(A.empty()) cout << "Yes" << endl; else cout << "No" << endl; }