#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a vector make_v(size_t a){return vector(a);} template auto make_v(size_t a,Ts... ts){ return vector(ts...))>(a,make_v(ts...)); } template typename enable_if::value==0>::type fill_v(T &t,const V &v){t=v;} template typename enable_if::value!=0>::type fill_v(T &t,const V &v){ for(auto &e:t) fill_v(e,v); } //INSERT ABOVE HERE signed main(){ Int n,m; cin>>n>>m; auto a=make_v(m,m); for(Int i=0;i>a[i][j]; auto b=make_v(m+1,m+1); fill_v(b,0); for(Int i=0;i(m+1,m+1); fill_v(s,0); for(Int i=0;i<=m;i++) for(Int j=0;j>x>>y; x--;y--; cout<