#include <bits/stdc++.h>
using namespace std;
#define N 101
int a[N][N], b[N][N];
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
ios_base::sync_with_stdio(0);
int n, m;
cin >> n >> m;
for(int i = 1; i <= n; i++) {
for(int j = 1; j <= m; j++) {
cin >> b[i][j];
a[i][j] = b[i][j];
a[i][j] += a[i - 1][j];
a[i][j] += a[i][j - 1];
a[i][j] -= a[i - 1][j - 1];
}
}
int p, A;
cin >> A >> p;
for(int ca = n * m; ca >= A; ca--) {
vector<int> l, g;
//cout<<a<<endl;
for(int i = 1; i * i <= ca; i++) {
if((ca % i) == 0) {
l.emplace_back(i);
if(i * i != ca) {
g.emplace_back(ca / i);
}
}
}
for(int i = (int)g.size() - 1; i >= 0; i--) {
l.emplace_back(g[i]);
}
vector<int> w;
for(int i = 0; i < l.size(); i++) {
w.emplace_back(ca / l[i]);
}
int r = l.size();
int p1 = 0, p2 = r - 1;
for(int i = 1; i <= n; i++) {
while(p2 >= 0 && i + l[p2] - 1 > n) {
p2--;
}
p1 = 0;
for(int j = 1; j <= m; j++) {
while(p1 < r && j + w[p1] - 1 > m) {
p1++;
}
//cout << "1: " << i << " " << j << " " << p1 << " " << p2 << endl;
for(int k = p1; k <= p2; k++) {
int c = i + l[k] - 1;
int d = j + w[k] - 1;
int cur = a[c][d] - a[i - 1][d] - a[c][j - 1] + a[i - 1][j - 1];
if((cur * 100) / ca >= p) {
cout << i << " " << j << " " << c << " " << d << '\n';
for(int ii = i; ii <= c; ii++) {
for(int jj = j; jj <= d; jj++) {
b[ii][jj] = -10001;
}
}
for(int ii = 1; ii <= n; ii++) {
for(int jj = 1; jj <= m; jj++) {
a[ii][jj] = b[ii][jj];
a[ii][jj] += a[ii - 1][jj];
a[ii][jj] += a[ii][jj - 1];
a[ii][jj] -= a[ii - 1][jj - 1];
}
}
}
}
}
}
}
return 0;
}