#P167. 【例28.1】 统计奖牌

【例28.1】 统计奖牌

Description

At the 2008 Beijing Olympics, athletes from Country Y participated in final events for n days (1 ≤ n ≤ 20).
Now we need to count the number of gold, silver, and bronze medals won by Country Y, as well as the total number of medals.

Input Format

Input n+1 lines. The first line contains n, the number of days Country Y participated in final events. The following n lines each contain the number of gold, silver, and bronze medals won by the country on that day, separated by spaces. All numbers are less than 100.

Output Format

Output a single line containing 4 integers: the total number of gold, silver, and bronze medals won by Country Y, and the total number of medals, separated by spaces.

Sample

3
1 0 3
3 1 0
0 3 0
4 4 3 11