var a:array [1..10] of integer;
maxi,mini,max,min:integer;
Begin
maxi:=2;
mini:=2;
for i:= 1 to 10 do Begin
read(a[i]);
if i=2 then begin
max = a[i]-a[i-1];
mix = a[i]-a[i-1];
end;
if i>2 and max < a[i]-a[i-1] then begin
max = a[i]-a[i-1];
maxi = i;
end;
if i>2 and min > a[i]-a[i-1] then begin
mix = a[i]-a[i-1];
mixi = i;
end;
end;
writeln('min: a[',mini,'] - a[',mini-1,'] = ',min);
writeln('max: a[',maxi,'] - a[',maxi-1,'] = ',max);
End.