uses crt;
var t,v,a:array[1..50]of real;
i,n,dem:integer;
tb:real;
begin
clrscr;
write('Nhap so hoc sinh:'); readln(n);
for i:=1 to n do
begin
write('Nhap diem Toan, Van cua ban thu ',i,'='); readln(t[i],v[i]);
end;
dem:=0;
for i:=1 to n do
begin
tb:=(t[i]+v[i])/2;
inc(dem);
a[dem]:=tb;
end;
for i:=1 to dem do
writeln('Trung binh hai mon Toan va Ngu Van cua ban thu ',i,'=',a[dem]:4:2);
readln;
end.