Const
n=10;
var
a:array[1..n]of integer;
i,i_max:integer;
max:real;
p:real;
begin
randomize;
for i:=1 to n do
begin
a[i]:=random(1001);
write(a[i]:4);
end;
writeln;
max:=a[1]*a[2];
i_max:=1;
for i:=2 to n-1 do
if a[i]*a[i+1]>max then
begin
max:=a[i]*a[i+1];
i_max:=i;
end;
writeln(i_max,' ',i_max+1);
end.