Const n = 5;
var a:array[1..n] of integer;
i,max1,max2,k,k1:integer;
begin
for i:=1 to n do
readln(a[i]);
max1:=-100000000000;
max2:=-100000000000;
for i:= 1 to n do
if a[i]>max1 then
begin
max1:= a[i]; k:=i;
end;
for i:= 1 to n do
if (a[i]>max2) and (a[i]begin
max2:= a[i]; k1:=i;
end;
Writeln('a[',k,']=', max1,' a[',k1,']=',max2);
end.