uses crt;
var a,b,c,tb:array[1..10]of real;
ln,nn:real;
i:integer;
begin
clrscr;
for i:=1 to 10 do readln(a[i],b[i],c[i]);
for i:=1 to 10 do
tb[i]:=(a[i]+b[i]+c[i])/3;
ln:=0;
nn:=10;
for i:=1 to 10 do
begin
if ln<tb[i] then ln:=tb[i];
if nn>tb[i] then nn:=tb[i];
end;
writeln(ln:4:2);
writeln(nn:4:2);
for i:=1 to 10 do
begin
if tb[i]>=5 then writeln('Ban thu ',i,' Dat')
else writeln('Ban thu ',i,'Chua dat');
end;
readln;
end.