var
a: array [0..14] of integer;
min, max, i: integer;
begin
for i := 0 to 14 do
readln(a[i]);
for i := 0 to 14 do
begin
if (a[min] > a[i]) then
min := i;
if (a[max] < a[i]) then
max := i;
end;
writeln('min: a[', min, ']', #13, 'max: a[', max, ']');
end.