program noname;
uses crt;
var
a:array[1..1000,1..1000] of integer;
i,j,min,n,m,l:integer;
begin
clrscr;
write('n='); readln(n);
write('m='); readln(m);
for i:=1 to n do
for j:=1 to m do begin
write('a[',i,',',j,']=');
readln(a[i,j]);
end;
for i:=1 to n do begin writeln;
for j:=1 to m do
write(a[i,j],' ');
end;
writeln;
for i:=1 to n do begin
min:=0;
for j:=1 to m do
if min>a[i,j] then begin min:=a[i,j]; l:=j; end;
if min<>0 then
writeln ('v ',i,' stroke indexy poslednego otricatelnogo chisla = ',i,',',l)
else writeln ('v ',i,' stroke otricatelnyh chisel net');
end;
readkey;
end.