var
c1,c2,a:integer;
begin
for var i := 0 to 9 do
readln(a);
if a mod 2 = 0 then c1 += a
else c2 += a;
end;
write(c1,' - ',c2);
end.
var
c1,c2,a:integer;
begin
for var i := 0 to 9 do
begin
readln(a);
if a mod 2 = 0 then c1 += a
else c2 += a;
end;
write(c1,' - ',c2);
end.