#include using namespace std; int l,x,n,maxi,i,i1,i2,j,j1,j2,a[59][59],s[59][59]; int sum(int i1,int j1,int i2,int j2) { if(i1>i2||j1>j2) return 0; return s[i2][j2]-s[i1-1][j2]-s[i2][j1-1]+s[i1-1][j1-1]; } int main() { //freopen("input","r",stdin); //freopen("output","w",stdout); maxi=-100000000; scanf("%d",&n); for(i=1;i<=n;i++) for(j=1;j<=n;j++) { scanf("%d",&a[i][j]); s[i][j]=s[i-1][j]+s[i][j-1]-s[i-1][j-1]+a[i][j]; } for(i1=1;i1<=n;i1++) for(j1=1;j1<=n;j1++) for(l=1;l+i1-1<=n&&l+j1-1<=n;l++) { i2=i1+l-1; j2=j1+l-1; if(i1maxi) maxi=x; } printf("%d\n",maxi); return 0; }