Var
i, max, min, maxi, mini: integer;
a: array[1..10] of integer;
begin
randomize;
for i:=1 to 10 do
a[i] := random(21) - 10;
max := a[1];
min := a[1];
for i:=2 to 10 do
begin
if a[i] > max then begin max := a[i]; maxi := i; end;
if a[i] < min then begin min := a[i]; mini := i; end;
end;
writeln(max, ' ', maxi);
writeln(min, ' ', mini);
end.