import java.util.Scanner;
public class Grid
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int H = in.nextInt();
int W = in.nextInt();
int N = in.nextInt();
int M = in.nextInt();
int T = in.nextInt();
int[][] grids = new int[H][W];
for (int r = 0; r < H; ++r) {
for (int c = 0; c < W; ++c) {
grids[r][c] = in.nextInt();
}
}
for (int r = 0; r <= H - N; ++r) {
for (int c = 0; c <= W - M; ++c) {
int sum = 0;
for (int i = r; i < r + N; ++i) {
for (int j = c; j < c + M; ++j) {
sum += grids[i][j];
}
}
if (sum >= T*N*M) {
System.out.println(1);
System.out.println("" + r + " " + c + " " + (r + N - 1) + " " + (c + M - 1));
return;
}
}
}
System.out.println(0);
}
}