/***********************************
Problem: POJ 1050 To the Max
Time: 0MS
Memory: 180K
Accepted Time: 2009-08-07 13:44:01
Tip: http://hi.baidu.com/yds_amber/blog/item/5808b0b32f5c0ea2d9335ab3.html
************************************/
#include <stdio.h>
#include <string.h>
int a[109][109];
int f2(int b[],int n)//求最大子段和
{
int i,temp=0,max=0;
for(i=1;i<=n;i++)
{
if(temp>0)temp+=b[i];
else temp=b[i];
if(max<temp)max=temp;
}
return max;
}
int f1(int n)//求最大子矩阵和
{
int i,j,k,max=0,b[109];
for(i=1;i<=n;i++)
{
memset(b,0,sizeof(b));
for(j=i;j<=n;j++)
{
for(k=1;k<=n;k++)
b[k]+=a[j][k];
int temp=f2(b,n);
if(max<temp)max=temp;
}
}
return max;
}
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
int i,j;
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
scanf("%d",&a[i][j]);
printf("%d/n",f1(n));
}
return 0;
}