#include <fstream>
#include <vector>
#include <stdint.h>

using namespace std;

int main()
{
	ifstream input;
	ofstream output;

	input.open("MATRANMAX.inp");
	output.open("MATRANMAX.out");

	int m, n, m1, n1;
	input >> m >> n >> m1 >> n1;
	long long a[m][n];
	int x, y;
	long long max = INT64_MIN;
	vector <vector <long long> > b(m, vector <long long>(n, 0));
	for (int i = 0; i < m; i++)
	{
		for (int j = 0; j < n; j++)
		{
			input >> a[i][j];
		}
	}

	for (int i = 0; i <= m - m1; i++)
	{
		for (int j = 0; j <= n - n1; j++)
		{
			for (int k = i; k < i + m1; k++)
			{
				for (int l = j; l < j + n1; l++)
				{
					b[i][j] += a[k][l];
				}
			}
		}
	}
	for (int i = 0; i <= m - m1; i++)
	{
		for (int j = 0; j <= n - n1; j++)
		{
			if (b[i][j] > max)
			{
				max = b[i][j];
				x = i;
				y = j;
			}
		}
	}

	output << max << '\n' << x + 1 << ' ' << y + 1;
	input.close();
	output.close();
	return 0;
}