#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; #define i_7 1000000007 #define i_5 1000000005 ll mod(ll a){ ll c=a%i_7; if(c>=0)return c; else return c+i_7; } typedef pair i_i; typedef pair l_l; typedef paird_d; #define inf 100000000//10^8 ///////////////////////////////// int main(){ int n,m;cin>>n>>m; int sum[n];for(int i=0;i<=n-1;i++)sum[i]=0; bool flag=false; while(m--){ int su=0,p; for(int i=0;i<=n-1;i++){ cin>>p;su+=p; sum[i]+=su; } for(int i=0;i<=n-1;i++){ int search=777+sum[i]; int *p=lower_bound(sum+i,sum+n,search); if(*p==search)flag=true; } if(sum[n-1]==777)flag=true; } if(flag)cout<<"YES"<