#include using namespace std; #define ALL(x) x.begin(),x.end() #define rep(i,n) for(int i=0;i<(n);i++) #define debug(v) cout<<#v<<":";for(auto x:v){cout<bool chmax(T &a,const T &b){if(abool chmin(T &a,const T &b){if(b>a[i]; int g;cin>>g; rep(i,6){ int p=min(a[i],g/val[i]); g-=p*val[i]; } cout<<(g==0?"YES\n":"NO\n"); return 0; }