const
  maxn = 100000;
var
  n, k, i, j, ii, ansl, ansm : integer;
  a : array[1..maxn] of integer;
  s : integer;
begin
  reset(input, 'cubics.in');
  rewrite(output, 'cubics.out');
  read(n, k);
  for i := 1 to n do begin
    read(a[i]);
  end;
  ansl := 0;
  ansm := -1;
  for i := 0 to n do begin
    for j := i + ansl + 1 to n do begin
      s := 0;
      for ii := i + 1 to j do begin
        s := s + a[ii];
      end;
      if (s = k * (j - i)) and (j - i > ansl) 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.