#include <bits/stdc++.h>
using namespace std;
int max3(int a,int b,int c)
{
return max(max(a,b),c);
}
int min3(int a,int b,int c)
{
return min(min(a,b),c);
}
int main(){
int n,a,b,c,mina=101,maxb=0;
double zhjc=0;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a>>b>>c;
if(max3(a,b,c)<mina) mina=max3(a,b,c);
if(min3(a,b,c)>maxb) maxb=min3(a,b,c);
zhjc+=a+b+c-max3(a,b,c)-min3(a,b,c);
}
zhjc=zhjc/(double)n;
printf("%d %d %.1lf",mina,maxb,zhjc);
return 0;
}