using System;
class Grid
{
public static void Main(string[] args)
{
string[] line = Console.ReadLine().Split(' ');
int H = Int32.Parse(line[0]);
int W = Int32.Parse(line[1]);
line = Console.ReadLine().Split(' ');
int N = Int32.Parse(line[0]);
int M = Int32.Parse(line[1]);
line = Console.ReadLine().Split(' ');
int T = Int32.Parse(line[0]);
int[,] grids = new int[H,W];
for (int r = 0; r < H; ++r) {
line = Console.ReadLine().Split(' ');
for (int c = 0; c < W; ++c) {
grids[r,c] = Int32.Parse(line[c]);
}
}
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) {
Console.WriteLine(1);
Console.WriteLine("" + r + " " + c + " " + (r + N - 1) + " " + (c + M - 1));
return;
}
}
}
Console.WriteLine(0);
}
}