program Hello;
var t,v,a:array[1..5] of real;
i:byte;
function xl(a,b,c:real): boolean;
begin
if (a > 8.0) then
if (b > 6.5) and (c > 6.5) then
xl:= true;
end;
begin
for i:= 1 to 5 do
begin
write('Diem ban thu ', i, ': ');
readln(t[i],v[i],a[i]);
end;
writeln('========Xep loai========');
for i:= 1 to 5 do
if (xl(t[i], v[i], a[i]) = true)
or (xl(v[i], a[i], t[i]) = true)
or (xl(a[i], t[i], v[i]) = true) then
writeln('Ban thu ', i, ' la HSG.');
readln;
end.