Program z1;
Var i,j,n,m:integer;
a: array [1..100, 1..100] of integer;
Begin
Write('Введите кол-во столбцов - '); Readln(n);
Write('Введите кол-во строк - '); Readln(m);
for i:=1 to n do
a[i][1]:=1;
for j:=1 to m do
a[1][j]:=1;
for i:=2 to n do
for j:=2 to m do
a[i][j]:=a[i-1][j]+a[i][j-1];
for i:=1 to n do begin
for j:=1 to m do
write(a[i][j],' ');
writeln;
end;
End.