#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);}) #define rd() ({int _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;}) #define wt(v) ({unsigned _z=v;do*--wp=_z%10+48;while(_z/=10);}) #define wt1(v) ({char wbuf[64],*wp=wbuf+sizeof wbuf;wt(v);write(1,wp,wbuf+sizeof wbuf-wp);}) #define rep(v,e) for(typeof(e) v=0;v=b?a:b) #define chmax(v,a) (v=v>=a?v:a) int a[100]; int b[100]; int c[200]; int d[200]; int e[100][100]; int main(){ rd_init(); int h=rd(); int w=rd(); int z; { int a1=0,a2=0; rep(y,h){ rep(x,w){ int v=rd(); a[y]+=v; b[x]+=v; c[y+x]+=v; d[y+w-1-x]+=v; e[y][x]=v; } if(a1z){ int x=i-y; if(x>=0&&xz){ int x=y+w-1-i; if(x>=0&&xz){ int y=i-x; if(y>=0&&yz){ int y=i+1-w+x; if(y>=0&&yz){ if(!(i+j+1-w&1)){ int y=i+j+1-w>>1; int x=i-j-1+w>>1; if(y>=0&&y=0&&x