#include using namespace std; using Int = long long; //INSERT ABOVE HERE signed main(){ Int n,m; cin>>n>>m; auto YES=[]{cout<<"YES"< v(n,0); for(Int i=0;i dp({0}); Int res=0; for(Int j=0;j>a; v[j]+=a; res+=v[j]; dp.emplace(res); if(dp.count(res-777)) YES(); } } cout<<"NO"<