PascalABC.NET 3.4.2, сборка 1814 от 02.10.2018
begin
var count := 0;
var a := Range(ReadInteger('a='), ReadInteger('b='))
.Select(t -> t.ToString.JoinIntoString(' ').ToIntegers)
.Where(t -> t.Count.IsEven);
foreach var x in a do
begin
var (b, i) := (true, 0);
while (b) and (i < x.Length - 1) do
begin
if (x[i].IsOdd and x[i + 1].IsOdd) or (x[i].IsEven and x[i + 1].IsEven)
then b := false;
inc(i, 2);
end;
if (i = x.Length) and (b) then inc(count);
end;
count.Println;
end.