uses crt;
var a,b,c,d,tl,tc:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
write('Nhap c='); readln(c);
write('Nhap d='); readln(d);
tc:=0;
tl:=0;
if a mod 2=0 then tc:=tc+a
else tl:=tl+a;
if b mod 2=0 then tc:=tc+b
else tl:=tl+b;
if c mod 2=0 then tc:=tc+c
else tl:=tl+c;
if d mod 2=0 then tc:=tc+d
else tl:=tl+d;
writeln('Tong cac so chan la: ',tc);
writeln('Tong cac so le la: ',tl);
readln;
end.