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

Задача 7120. Sum of Diagonal Elements


Input: The program receives as input the number N <= 15, which is the number of rows and columns in the array. Next, the input stream contains N lines of N numbers that are elements of the array.

Output: The program should output a line containing space-separated numbers that are the sum of those two elements of each line that belong to the main and secondary diagonals

Examples
# Input Output
1
5
16 17 29 17 30 
26 12 14 12 2 
23 6 30 27 13 
15 7 28 20 2 
11 16 21 26 24
46 24 30 27 35