Var mas:array [1..100, 1..100] of Integer;
n, m, i, j, k, ok:Integer;
begin
write("Введите n и m: ");
readln(n, m);
for i:=1 to n do
for j:=1 to m do
read(mas[i,j]);
for i:=1 to n do
for j:=i+1 to n do
begin
ok:=1;
for k:=1 to m do
if mas[i,k]=mas[j,k]
then
begin
ok:=0;
break;
end;
if (ok=1)
then
writeln(i, j:3);
end;
end.