Var a : array [1..3] of array [1..3] of integer;
i,j : shortint;
c1,c2,s1,s2 : integer;
begin
a[1][1]:=-10;
a[1][2]:=20;
a[1][3]:=13;
a[2][1]:=-22;
a[2][2]:=11;
a[2][3]:=-5;
a[3][1]:=4;
a[3][2]:=12;
a[3][3]:=-8;
s1:=0; s2:=0; c1:=0; c2:=0;
for i:=1 to 3 do begin
for j:=1 to 3 do begin
if a[i][j]>0 then begin
s1:=s1+a[i][j];
inc (c1);
end else begin
s2:=s2+a[i][j];
inc (c2);
end;
end;
end;
writeln (s1/c1:0:0);
writeln (s2/c2:0:2);
end.