#include <bits/stdc++.h>
using namespace std;
int main()
{
int H, W;
cin >> H >> W;
int N, M;
cin >> N >> M;
int T;
cin >> T;
vector< vector<int> > grids(H, vector<int>(W));
for (int r = 0; r < H; ++r) {
for (int c = 0; c < W; ++c) {
cin >> grids[r][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) {
cout << 1 << endl;
cout << r << " " << c << " " << (r + N - 1) << " " << (c + M - 1) << endl;
return 0;
}
}
}
cout << 0 << endl;
}