#include using namespace std; #define int long long const int maxn=105; int u[800]; int res[800][800]; int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int n,m;cin>>n>>m; int a[n][m]; for(int i=0;i>a[i][j]; vector h={i,j+100,i+j+200,i-j+500}; for(int x:h) { u[x]+=a[i][j]; } for(int x:h) for(int y:h) res[x][y]+=a[i][j]; } } int answ=0; for(int i=0;i<800;++i) { for(int j=0;j<800;++j) { answ=max(answ,u[i]+u[j]-res[i][j]); } } cout<