#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+1];for(int i=0;i<=n;i++)sum[i]=0; bool flag=false; while(m--){ int su=0,p; for(int i=1;i<=n;i++){ cin>>p;su+=p; sum[i]+=su; } for(int i=0;i<=n;i++){ int search=777+sum[i]; int *p=lower_bound(sum+i,sum+n+1,search); if(*p==search)flag=true/*,cout<