Go: package main

import (
	"fmt"
	"strconv"
)

func main() {
	for _, leftValue := range MultiplicationTableNum(9) {
		for _, rightValue := range MultiplicationTableNum(9) {
			strLeftVal, strRightVal, strMulti := strconv.Itoa(leftValue), strconv.Itoa(rightValue), strconv.Itoa(Multiplication(leftValue, rightValue))
			fmt.Println(strLeftVal + "x" + strRightVal + "=" + strMulti)
		}
	}
}

func MultiplicationTableNum(num int) []int {
	multiNum := []int{}
	for i := 1; i <= num; i++ {
		multiNum = append(multiNum, i)
	}
	return multiNum
}

func Multiplication(x, y int) int {
	return x * y
}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };


int main() {
#ifdef _DEBUG
	printf( "debug\n" );
#endif
	while(1){}
	return 0;
}

C++: #include<stdio.h>
int a, b;int main(){for(a=1;a<=9;a++)for(b=1;b<=9;b++)printf("%dx%d=%d\n",a,b,a*b);return 0;}

C++: #include<iostream>
using namespace std;
int main()
{
    int i,j;
    for(i=1;i<=9;i++)
     for(j=1;j<=9;j++)
          cout<<i<<"x"<<j<<"="<<i*j<<endl;
    return 0;
}

C++: #include<iostream> 
using namespace std; 
int main() 
{
 for(int i(1);i<10;i++) 
{ for(int j(1);j<10;j++) 
cout<<i<<'*'<<j<<'='<<i*j<<endl; 
}
 return 0;
 }

C++: #include <iostream>
using namespace std;

int main() {
    for ( int i = 1; i <= 9; ++ i ) {
        for ( int j = 1; j <= 9; ++ j ) {
            cout << i << "x" << j << "=" << i * j << endl;
        }
    }
	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {
    for(int i=1;i<10;i++){
        for(int j=1;j<10;j++){
            cout << i << "x" << j << "=" << i*j << endl;
        }
    }
    return 0;
}

C++: #include <iostream>
int main()
{
  std:cout << "Hello World" << "\n";
}

C++: #include<iostream>
using namespace std;

int main(){

for (int i=0;i<=9;i++){
for (int j=0;j<=9;j++)

cout < i <"x"<j<"=" < i*j
}
}
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    for(int i=1;i<=9;i++)
        for(int j=1;j<=9;j++)
        cout<<i<<"x"<<j<<"="<<i*j<<endl;

    return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <cmath>
//ranker
using namespace std;

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using psi = pair<string, int>;
using D = double;


const int Max=10000000;
bool prime[Max];
int main()
{
    for(int i = 1 ; i <= 9 ; i++){
        for(int j = 1 ; j <= 9 ; j++){
            printf("%dx%d=%d\n",i,j,i*j);
        }
    }
    return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
	for(int i=0;i<9;i++)
		for(int j=0;j<9;j++)
			cout << i+1 << "x" << j+1 << "=" << (i+1)*(j+1) <<endl;
    return 0;
}

C++: #include<stdio.h>

int main(void){
for(int i=0;i<10;i++){
for(int j=0;j<10;j++){
printf("%dx%d=%d\n",i,j,i*j);
return 0;
}}}

C++: main(i,j){for(i=1;i<=9;i++)for(j=1;j<=9;j++)printf("%dx%d=%d\n",i,j,i*j);}

C++: #include <stdio.h>

int main(void)
{
for (int i = 1; i <= 9; i++){
for (int j = 1; j <= 9; j++){
printf("%dx%d=%d\n", i, j, i * j);
}
}

return (0);
}

C++: #include<iostream>
#include<stdio.h>
int main(){
	int a,b;
		for(a=1;a<10;a++){
			for(b=1;b<10;b++){
				std::cout<<a<<"x"<<b<<"="<<a*b<<std::endl;
				}
			}


  
      return 0;
	}

C++: #include <iostream>

using namespace std;

int main(){
	

	

	
	for (int x = 1; x <= 9; x++){
		for (int i = 1; i <= 9; i++){
			cout << x << "x"<< i << "=" << i * x << "\n"; 
		
		}
	}
	
	return (0);
}

C++: #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;
}

C++: #include <stdio.h>

int main(void)
{
	int i , j;
	
	for (i = 0; i < 9; i++){
		for (j = 0; j < 9; j++){
			printf("%dx%d=%d\n", i + 1, j + 1, (i + 1) * (j + 1));
		}
	}
	
	return (0);
}

C++: #include<stdio.h>
int main()
{
	for(int i = 1; i < 10; i++)
	{
		for(int j = 1; j < 10; j++)
		{
			printf("%dx%d=%d\n", i, j, i*j);
		}
	}
		
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <stdio.h>
using namespace std;
int main(void)
{
	for (int i = 1; i <= 9; i++)
		for (int j = 1; j <= 9; j++)
			printf("%dx%d=%d\n", i, j, i * j);

	return 0;
}

C++: #include<iostream>
main(){for(int y=0;y++<9;){for(int x=1;x<10;){std::cout<<y<<'x'<<x++<<'='<<x*y<<std::endl;}}return 0;}

C++: #include <iostream>
using namespace std;

int main() {
 for (int i = 0; i < 9 ; i++) {
   for (int j = 0; j < 9; j++) {
     cout << i+1 << "??" << j+1 << "=" << (i+1)*(j+1) << endl;
    }
  }
   return 0 ;
}