program exam1;

{\$APPTYPE CONSOLE}

uses
SysUtils;

type kol=record
plus,minus,nul:integer;
end;
matr=array[1..10,1..10] of integer;
mas=array[1..10] of integer;
var
a:matr;
d,c:mas;
B:ARRAY[1..10] OF kol;

i,j,m,n,kolnul,u,kolminus,kolplus,k:integer;

begin
repeat
writeln('Vvedite razmernost');
until (m<10) and (n<10);
writeln('Vvedite elementi:');
for i:=1 to m do
for j:=1 to n do
writeln('Vveli:');
for i:=1 to m do begin
for j:=1 to n do write(a[i,j]:4);
writeln;
end;
writeln;

for i:=1 to m do begin
kolminus:=0; kolnul:=0;kolplus:=0;
for j:=1 to n do begin
if a[i,j]<0 then kolminus:=kolminus+1;b[i].minus:=kolminus;
if a[i,j]>0 then kolplus:=kolplus+1;b[i].plus:=kolplus;
if a[i,j]=0 then kolnul:=kolnul+1;b[i].nul:=kolnul;
end;
end;
writeln('Kol-vo otricatelnix elem-v po strokam:');
for i:=1 to m do WRITE(b[i].minus:5);
writeln;
writeln('Kol-vo pologitelnix elementov:');
for i:=1 to m do write(b[i].plus:5);
writeln;
writeln('Kol-vo nuley:');
for i:=1 to m do write (b[i].nul:5);
writeln;
writeln;