A table of some championship is given. The elements of the main diagonal are 888. Each element of the array that is not on the main diagonal can be either a single or double digit number, the record of which is formed by numbers indicating the number of goals scored (the first digit of the number) and the number of missed (the second digit of the number) in this match .
For example: 32 - three scored, two missed.
0 - zero scored, zero missed
5 - zero scored, five conceded
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 N lines of 2 numbers each: the total number of goals scored and the total number of goals conceded by each team
# |
Input |
Output |
1 |
3
888 29 37
92 888 57
73 75 888
|
5 16
14 9
14 8
|