Олимпиадный тренинг

Задача 18783. Diagonals


In the square table NxN, calculate the sums of the numbers on the diagonals.
 
Input
The first line contains the number N (1<=N<=100) and then the matrix NxN.  Matrix elements are numbers that do not exceed 32767 in absolute value.
 
Output
First print the sum of the numbers on the main diagonal,  and then, one space later, on the secondary diagonal.
 
Examples
# Input Output
1
3
1 2 3
4 5 6
10 9 8
14 18