http://ybt.ssoier.cn:8088/problem_show.php?pid=1064
/*
1064:奥运奖牌计数
http://ybt.ssoier.cn:8088/problem_show.php?pid=1064
*/
#include<iostream>
using namespace std;
int main(){
int n,jp=0,yp=0,tp=0;
cin>>n;
for (int i=1,x,y,z; i<=n; i++){
cin>>x>>y>>z;
jp += x;
yp += y;
tp += z;
}
cout<<jp<<" "<<yp<<" "<<tp<<" "<<jp+yp+tp<<endl;
return 0;
}