ll n,x,y,z,a,t; priority_queueq; ll f(char*s){wt(s);exit(0);} ll g(ll&v,ll m){return v?v-=t=min(v,a/m)?:1,a-=m*t,1:0;} { rd(n,x,y,z); rep(n)rd(a),q.push(a); for(;;){ a=q.top();q.pop(); a<0?f("Yes"):g(z,1e4)||g(y,5e3)||g(x,1e3)||f("No"); q.push(a); } }