import sys
import numpy
H, W = input().split()
H, W = int(H), int(W)
N, M = input().split()
N, M = int(N), int(M)
T = int(input())
grids = numpy.empty([H, W])
for r in range(H):
grids[r] = input().split()
for c in range(W):
grids[r][c] = int(grids[r][c])
for r in range(H - N + 1):
for c in range(W - M + 1):
sum = 0
for i in range(r, r + N):
for j in range(c, c + M):
sum += grids[i][j]
if (sum >= T*N*M):
print(1)
print(r, c, r + N - 1, c + M - 1);
sys.exit(0)
print(0)