var a,s1,s2,i: integer;
begin
s1:=0;
s2:=0;
for i:=1 to 10 do
a:=random(20)+1;
write(a,' ');
if a mod 2=0 then s1:=s1+a else s2:=s2+a;
end;
writeln;
writeln(s1,' ',s2,' ',s1-s2);
end.
var a,s1,s2,i: integer;
begin
s1:=0;
s2:=0;
for i:=1 to 10 do
begin
a:=random(20)+1;
write(a,' ');
if a mod 2=0 then s1:=s1+a else s2:=s2+a;
end;
writeln;
writeln(s1,' ',s2,' ',s1-s2);
end.