Uses crt;
var a:array [ 1..1000, 1..1000] of longint;
i, j, m, n, max, kol: longint;
begin
writeln ( ' vvedite razmeri matrici (MxN)' );
readln ( m,n );
for i:=1 to m do
begin
for j:=1 to n do
begin
writeln (' vvedite element matrici' i,'x',j );
readln ( a [ i,j] );
end;
end;
for i:=1 to m do
begin
for j:=1 to n do
begin
if a [ i,j ] > max then
max:=a [ x, j ];
end;
end;
for i:=1 to m do
begin
for j:=1 to n do
begin
if a [ i,j ]= max then
inc ( kol );
end;
end;
writeln (' max= ', max,', vstrechaetsya', kol,' raz.');
end.