Var
a: array [,] of integer;
begin
var n := ReadlnInteger('n = ');
var m := ReadlnInteger('m = ');
var rand := ReadlnInteger('Для ручного ввода нажмите 0');
if rand = 0 then begin
a := new integer[m, n];
for var i := 0 to m-1 do
for var j := 0 to n-1 do
a[i, j] := ReadlnInteger('a[' + i + ',' + j + '] = ');
end
else a := MatrixRandom(m, n, 1, 100);
Println(a);
var b := ArrGen(n, x -> 1);
for var i := 0 to m-1 do
for var j := 0 to n-1 do
if j mod 2 = 0 then
b[j] := b[j] * a[i, j];
b.Where((x, i)-> i mod 2 = 0).SortedDescending().Println();
end.