#include #include using namespace std; int main(int argc, char* argv[]) { int N,M; cin>>N>>M; int i,j,k; vector A(N,0); for (i=0;i>b; A[j]+=b; if (A[j]==777){ cout<<"Yes"<777){ break; } } } } cout<<"No"<