#include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ int n, x, y, z; cin >> n >> x >> y >> z; bool ok = true; for(int i = 0; i < n; i++) { int a; cin >> a; while(a > 0){ if(a >= 10000 && z > 0){ a -= 10000; x--; }else if(a >= 5000 && y > 0){ a -= 5000; y--; }else if(x > 0){ a -= 1000; x--; }else if(y > 0){ a -= 5000; y--; }else if(z > 0){ a -= 10000; z--; } if(x == 0 && y == 0 && z == 0){ ok = false; break; } } } if(!ok){ cout << "No\n"; }else{ cout << "Yes\n"; } return 0; }