xuehao=[]
xingming=[]
shuxue=[]
yuwen=[]
yingyu=[]
zcj=[]
shuliang=input("请输入学生数量\n")
print(shuliang)
for i in range(int(shuliang)):
a, b, c, d, e = input("输入第%s位同学:"%(i+1)).split()
xuehao.append(a)
xingming.append(b)
shuxue.append(c)
yuwen.append(d)
yingyu.append(e)
sum1=0
sum2=0
sum3=0
for i in shuxue:
sum1=sum1+int(i)
shuxuepjz=sum1/int(shuliang)
for i in yuwen:
sum2=sum2+int(i)
yuwenpjz=sum2/int(shuliang)
for i in yingyu:
sum3=sum3+int(i)
yingyupjz=sum3/int(shuliang)
print("%.2f %.2f %.2f"%(shuxuepjz,yuwenpjz,yingyupjz))
for i in range(int(shuliang)):
zcj.append(shuxue[i]+yuwen[i]+yingyu[i])
xiabiao=zcj.index(max(zcj))
print("%s %s %s %s %s"%(xuehao[xiabiao],xingming[xiabiao],shuxue[xiabiao],yuwen[xiabiao],yingyu[xiabiao] ))