var A:array[0..24] of integer;
max, min, i, dif: integer;
begin
for i:= 0 to 24 do
readln(A[i]);
max := A[0]; min := A[0];
for i:= 15 to 24 do
if(A[i] > max) then
max := A[i]
else
if (A[i] < min) then
min := A[i];
dif := max - min;
write('Разница между max и min: ', dif)
end.