Var maxam,i,n,cs : Integer;
A:array[1..100] of integer;
Begin
Write (' nhap n : ');
Readln(n);
For i:= 1 to n do Begin
Write ('A[',i,']=');
Readln(A[i]);
end;
For i:= 1 to n do If A[i]<0 then maxam:=A[i];
Maxam:=A[1]; cs:=1;
For i:= 2 to n do begin
If (A[i]<0) and ( maxam<A[i]) then
begin
Maxam:=A[i];
cs:=i;
end;
end;
Writeln (' pt am lon nhat trong mang : ',Maxam);
Writeln(' vi tri cua ptu do la :',cs);
Readln;
end.