#include<iostream>
#include<cstdio>

using namespace std;

#define N 105
#define INF 0xfffffff

int n,a[N][N],b[N][N];
int ans, tot;

void init(){
    int i,j,k;
    int d,cnt;

    for(k=n;k>=1;k-=2){
        d=(n-k)/2+1;

        i=j=d; cnt=0;
        while(j<=n-d) b[d][cnt++]=a[i][j++];
        while(i<=n-d) b[d][cnt++]=a[i++][j];
        while(j>d) b[d][cnt++]=a[i][j--];
        while(i>d) b[d][cnt++]=a[i--][j];
    }
//    k=n-1;
//    for(d=1;d<(n+1)/2;d++){// leave out center!
//        printf("d=%d: ",d);
//        for(i=0;i<4*k;i++) printf("%d ",b[d][i]);
//        cout<<endl;
//
//        k-=2;
//    }
//    cout<<endl;
}

void solve(){
    int i,j,k;
    int step,d, Max,t,tmp, M;

    ans=a[(n+1)/2][(n+1)/2];// center
    tot=0;

    step=n-1;// distance
    for(d=1;d<(n+1)/2;d++){// layer, leave out center!
//        printf("d=%d step=%d: ",d, step);
//        for(i=0;i<4*step;i++) printf("%d ",b[d][i]);
//        cout<<endl;

        Max=-INF, M=4*step;
        for(i=0;i<step;i++){
            t=b[d][i] + b[d][(i+step)%M] + b[d][(i+2*step)%M] + b[d][(i+3*step)%M];
            if(t>Max){
                Max=t, tmp=i;
            }

            t=b[d][i] + b[d][(i-step+M)%M] + b[d][(i-2*step+M)%M] + b[d][(i-3*step-M)%M];
            if(t>Max){
                Max=t, tmp=i;
            }
        }
        ans+=Max, tot+=tmp;
//        printf("ans=%d tot=%d    Max=%d tmp=%d\n",ans,tot,Max,tmp);
//        cout<<endl;

        step-=2;
    }

//    printf("ans=%d tot=%d\n", ans,tot);
    printf("%d %d\n", ans,tot);
}

int main(){
//    freopen("data_in.txt","r",stdin);
    int i,j,k;

    while(scanf("%d",&n), n){
        for(i=1;i<=n;i++) for(j=1;j<=n;j++) scanf("%d",&a[i][j]);

        init();
        solve();
    }

    return 0;
}