type
mas = array[1..10] of integer;
const
A: mas = (1, 0, -3, 0, 5, 0, 7, -8, 9, -10);
B: mas = (0, 2, -3, 4, 0, -6, -7, 0, 0, 10);
var
i: byte;
c, s: integer;
function count_null(m: mas): integer;
begin
c:= 0;
for i:= 1 to 10 do
begin
if m[i] = 0 then c:= c+1;
end;
result:= c;
end;
function count_minus(m: mas): integer;
begin
s:= 0;
for i:= 1 to 10 do
begin
if m[i] < 0 then s:= s + m[i];
end;
result:= s;
end;
begin
if count_null(A) > count_null(B) then writeln('A > B')
else writeln('B > A');
writeln(count_minus(A));
writeln(count_minus(B));
readln;
end.