const N=4;
var a:array[1..N,1..N]of integer;
i,j,s,k:integer;
begin
for i:=1 to N do for j:=1 to N do a[i,j]:=random(10);
for i:=1 to N do begin for j:=1 to N do write(a[i,j],' '); if j=N then writeln; end;
for i:=1 to N do
for j:=1 to N do
if (i>j) then begin inc(k); s:=s+a[i,j]; end;
writeln(s,' ',k);
end.