Program hotrotinhoc_hoc24;
var a:array[1..32000] of integer;
i,n,j,k,t:longint;
begin
write('Nhap so phan tu cua mang : '); readln(n);
for i:= 1 to n do
begin
write('a[',i,']='); readln(a[i]);
end;
readln;
write('Nhap so nguyen k : '); readln(k);
t:=0;
for i:= 1 to n-1 do
begin
t:=0;
for j:= i to n do
begin
t:=t+a[j];
if (t div ((j+1)-i) = k) and (t mod ((j+1)-i) = 0 ) then
begin
writeln(i,' ',((j+1)-i));
break;
end;
end;
if t div ((j+1)-i) = k then
break;
end;
readln
end.