#include using namespace std; int main() { int N, X, Y, Z; cin >> N >> X >> Y >> Z; vector v(N); for (auto& x : v) cin >> x; for (auto [a, b] : vector>{{10000, Z}, {5000, Y}, {1000, X}}) { for (int i = 0; i < N; i++) { int x = min(v[i] / a, b); v[i] -= x * a; b -= x; } sort(v.rbegin(), v.rend()); fill(v.begin(), v.begin() + min(b, N), -1); } if (*max_element(v.begin(), v.end()) == -1) cout << "Yes" << endl; else cout << "No" << endl; }