uses crt;
var a,b,dem,i:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
writeln('Cac so chan va chia het cho 3 trong khoang tu ',a,' toi ',b,' la: ');
dem:=0;
for i:=a to b do
if (i mod 2=0) and (i mod 6=0) then
begin
write(i:4);
dem:=dem+1;
end;
writeln;
writeln('Co ',dem,' so chan va chia het cho 3 trong khoang tu ',a,' toi ',b);
readln;
end.