uses crt;
var a,b,i,t,t1:integer;
begin
clrscr;
write('a='); readln(a);
write('b='); readln(b);
if a<b then
begin
t:=0; t1:=0;
for i:=a to b do
begin
if i mod 2=0 then t:=t+i
else t1:=t1+i;
end;
writeln('tong cac so chan trong khoang tu ',a,' toi ',b,' la: ',t);
writeln('tong cac so le trong khoang tu ',a,' toi ',b,' la: ',t1);
end
else writeln('vui long nhap lai');
readln;
end.