program info;
var
sp,cp,si,ci,n:integer;
mi,mp:real;
begin
n:=1;
cp:=0;
ci:=0;
sp:=0;
si:=0;
while n<>0 do begin
readln(n);
if(n mod 2 = 0) then
begin
sp := sp+n;
cp := cp+1;
end
else
begin
si := si+n;
ci := ci+1;
end
end;
mp:=sp/cp;
mi:=si/ci;
writeln('suma pare=',sp);
writeln('media pare=',mp);
writeln('suma impare=',si);
writeln('media impare=',mi);
end.