const
  maxn = 100000;
var
  n, i, j, ansl, ansm : integer;
  a : array[1..maxn] of integer;
  s : array[0..maxn] of int64;
  k : int64;
begin
  reset(input, 'cubics.in');
  rewrite(output, 'cubics.out');
  read(n, k);
  s[0] := 0;
  for i := 1 to n do begin
    read(a[i]);
    s[i] := s[i - 1] + a[i];
  end;
  ansl := 0;
  ansm := -1;
  for i := 0 to n do begin
    for j := i + ansl + 1 to n do begin
      if (s[j] - s[i] = k * (j - i)) then begin
        ansl := j - i;
        ansm := i + 1;
      end;
    end;
  end;
  if (ansm = -1) then begin
    writeln(0);
  end else begin
    writeln(ansl, ' ', ansm);
  end;
end.