var
H, W, N, M, T : longint;
r, c, i, j, sum : longint;
grids : array of array of longint;
begin
read(H, W);
read(N, M);
read(T);
setLength(grids, H, W);
for r := 0 to H-1 do
begin
for c := 0 to W-1 do
begin
read(grids[r][c]);
end;
end;
for r := 0 to H-N do
begin
for c := 0 to W-M do
begin
sum := 0;
for i := r to r+N-1 do
begin
for j := c to c+M-1 do
begin
sum := sum + grids[i][j];
end;
end;
if sum >= T*N*M then
begin
writeln(1);
writeln(r, ' ', c, ' ', r + N - 1, ' ', c + M - 1);
exit;
end;
end;
end;
writeln(0);
end.