uses crt;
var ten:array[1..50]of string;
diem:array[1..50]of integer;
i,n,max:integer;
begin
clrscr;
write('Nhap so hoc sinh:'); readln(n);
for i:=1 to n do
begin
write('Ten cua hoc sinh thu ',i,' la: '); readln(ten[i]);
write('Diem cua hoc sinh thu ',i,' la: '); readln(diem[i]);
end;
max:=0;
for i:=1 to n do
if max<diem[i] then max:=diem[i];
writeln('Diem cao nhat la: ',max);
for i:=1 to n do
if diem[i]=max then writeln(ten[i]);
readln;
end.