#include using namespace std; using i64 = long long; #define rep(i,s,e) for(i64 (i) = (s);(i) < (e);(i)++) #define all(x) x.begin(),x.end() template static inline std::vector ndvec(size_t&& n, T val) noexcept { return std::vector(n, std::forward(val)); } template static inline auto ndvec(size_t&& n, Tail&&... tail) noexcept { return std::vector(tail)...))>(n, ndvec(std::forward(tail)...)); } template struct chain { Cond cond; chain(Cond cond) : cond(cond) {} bool operator()(T& a, const T& b) const { if(cond(a, b)) { a = b; return true; } return false; } }; template chain make_chain(Cond cond) { return chain(cond); } int main() { i64 N, X, Y, Z; cin >> N >> X >> Y >> Z; vector A(N); rep(i,0,N) { cin >> A[i]; A[i] = A[i] / 1000 + 1; } vector> vec(N); rep(i,0,N) { vec[i].first = A[i] % 5; vec[i].second = i; } sort(all(vec)); for(auto p: vec) { if(p.first <= X) { X -= p.first; A[p.second] /= 5; } else { A[p.second] /= 5; A[p.second] += 1; } } Y += X / 5; rep(i,0,N) { vec[i].first = A[i] % 2; vec[i].second = i; } sort(all(vec)); for(auto p: vec) { if(p.first <= Y) { Y -= p.first; A[p.second] /= 2; } else { A[p.second] /= 2; A[p.second] += 1; } } Z += Y / 2; rep(i,0,N) { if(A[i] <= Z) { Z -= A[i]; } else { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }