Var a,i,j,b,p,p1,max:longint; m:array[0..501,1..500] of longint; begin read(a,b); for i:=1 to a do for j:=1 to b do read(m[i,j]); p:=1; p1:=1; max:=m[1,1]; for i:=1 to a do for j:=1 to b do if m[i,j]>max then begin p:=i; p1:=j; max:=m[i,j]; end; writeln(p,' ',p1); end.
m:array[0..501,1..500] of longint;
begin
read(a,b);
for i:=1 to a do
for j:=1 to b do
read(m[i,j]);
p:=1;
p1:=1;
max:=m[1,1];
for i:=1 to a do
for j:=1 to b do
if m[i,j]>max then
begin
p:=i;
p1:=j;
max:=m[i,j];
end;
writeln(p,' ',p1);
end.