#include <bits/stdc++.h>
void gi(long long int &x) {
  char ch = getchar();
  x = 0;
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
}
long long int a[1020][1020];
long long int h[1020][1020], s[1020][1020], lu[1020][1020], ru[1020][1020];
long long int right[1020][1020], left[1020][1020], down[1020][1020],
    up[1020][1020], f[1020][1020];
long long int n, m, k;
inline long long int dis(long long int x, long long int y) {
  if (x < 0) x = -x;
  if (y < 0) y = -y;
  return x + y;
}
void init() {
  long long int i, j;
  gi(n);
  gi(m);
  gi(k);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) gi(a[i][j]);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) {
      h[i][j] = h[i][j - 1] + a[i][j];
      s[i][j] = s[i - 1][j] + a[i][j];
      lu[i][j] = lu[i - 1][j - 1] + a[i][j];
      ru[i][j] = ru[i - 1][j + 1] + a[i][j];
    }
}
long long int DIS(long long int x1, long long int y1, long long int x2,
                  long long int y2) {
  if (x1 > x2) return DIS(x2, y2, x1, y1);
  if (x1 == x2) {
    if (y1 < y2)
      return h[x1][y2] - h[x1][y1 - 1];
    else
      return h[x1][y1] - h[x1][y2 - 1];
  } else if (y1 == y2)
    return s[x2][y1] - s[x1 - 1][y1];
  else if (y1 - x1 == y2 - x2)
    return lu[x2][y2] - lu[x1 - 1][y1 - 1];
  else
    return ru[x2][y2] - ru[x1 - 1][y1 + 1];
}
long long int TR1down(long long int x, long long int y) {
  return DIS(x + (k - 1), y, x, y + (k - 1)) -
         DIS(x + (k - 1), y - 1, x, y - k);
}
long long int TR1up(long long int x, long long int y) {
  return DIS(x - (k - 1), y, x, y + (k - 1)) -
         DIS(x - (k - 1), y - 1, x, y - k);
}
long long int TR1left(long long int x, long long int y) {
  return DIS(x, y - (k - 1), x + (k - 1), y) -
         DIS(x - 1, y - (k - 1), x - k, y);
}
long long int TR1right(long long int x, long long int y) {
  return DIS(x, y + (k - 1), x + (k - 1), y) -
         DIS(x - 1, y + (k - 1), x - k, y);
}
long long int TR2down(long long int x, long long int y) {
  return DIS(x + (k - 1), y, x, y + (k - 1)) +
         DIS(x + (k - 1), y, x, y - (k - 1)) -
         DIS(x - 1, y - (k - 1), x - 1, y + (k - 1)) - a[x + (k - 1)][y];
}
long long int TR2up(long long int x, long long int y) {
  return DIS(x - (k - 1), y, x, y + (k - 1)) +
         DIS(x - (k - 1), y, x, y - (k - 1)) -
         DIS(x + 1, y - (k - 1), x + 1, y + (k - 1)) - a[x - (k - 1)][y];
}
long long int TR2left(long long int x, long long int y) {
  return DIS(x, y - (k - 1), x - (k - 1), y) +
         DIS(x, y - (k - 1), x + (k - 1), y) -
         DIS(x - (k - 1), y + 1, x + (k - 1), y + 1) - a[x][y - (k - 1)];
}
long long int TR2right(long long int x, long long int y) {
  return DIS(x, y + (k - 1), x - (k - 1), y) +
         DIS(x, y + (k - 1), x + (k - 1), y) -
         DIS(x - (k - 1), y - 1, x + (k - 1), y - 1) - a[x][y + (k - 1)];
}
void getdown() {
  long long int x = 1, y = k;
  long long int i, j;
  down[x][y] = 0;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (dis(i - x, j - y) < k) down[x][y] += a[i][j];
  for (i = k + 1; i <= m - k + 1; i++)
    down[1][i] = down[1][i - 1] + TR1down(1, i);
  for (i = 2; i <= n - k + 1; i++) down[i][k] = down[i - 1][k] + TR2down(i, k);
  for (i = 2; i <= n - k + 1; i++)
    for (j = k + 1; j <= m - k + 1; j++)
      down[i][j] = down[i][j - 1] + TR1down(i, j);
}
void getup() {
  long long int x = n, y = k;
  long long int i, j;
  up[x][y] = 0;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (dis(i - x, j - y) < k) up[x][y] += a[i][j];
  for (i = k + 1; i <= m - k + 1; i++) up[n][i] = up[n][i - 1] + TR1up(n, i);
  for (i = n - 1; i >= k; i--) up[i][k] = up[i + 1][k] + TR2up(i, k);
  for (i = n - 1; i >= k; i--)
    for (j = k + 1; j <= m - k + 1; j++) up[i][j] = up[i][j - 1] + TR1up(i, j);
}
void getleft() {
  long long int x = k, y = m;
  long long int i, j;
  left[x][y] = 0;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (dis(i - x, j - y) < k) left[x][y] += a[i][j];
  for (i = m - 1; i >= k; i--) left[k][i] = left[k][i + 1] + TR2left(k, i);
  for (i = k + 1; i <= n - k + 1; i++)
    left[i][m] = left[i - 1][m] + TR1left(i, m);
  for (i = k + 1; i <= n - k + 1; i++)
    for (j = m - 1; j >= k; j--) left[i][j] = left[i - 1][j] + TR1left(i, j);
}
void getright() {
  long long int x = k, y = 1;
  long long int i, j;
  right[x][y] = 0;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (dis(i - x, j - y) < k) right[x][y] += a[i][j];
  for (i = 2; i <= m - k + 1; i++)
    right[k][i] = right[k][i - 1] + TR2right(k, i);
  for (i = k + 1; i <= n - k + 1; i++)
    right[i][1] = right[i - 1][1] + TR1right(i, 1);
  for (i = k + 1; i <= n - k + 1; i++)
    for (j = 2; j <= m - k + 1; j++)
      right[i][j] = right[i - 1][j] + TR1right(i, j);
}
void getf() {
  long long int x = k, y = k;
  long long int i, j;
  f[x][y] = 0;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++)
      if (dis(i - x, j - y) < k) f[x][y] += (k - dis(i - x, j - y)) * a[i][j];
  for (i = k + 1; i <= n - k + 1; i++)
    f[i][k] = f[i - 1][k] + down[i][k] - up[i - 1][k];
  for (i = k + 1; i <= m - k + 1; i++)
    f[k][i] = f[k][i - 1] + right[k][i] - left[k][i - 1];
  for (i = k + 1; i <= n - k + 1; i++)
    for (j = k + 1; j <= m - k + 1; j++)
      f[i][j] = f[i - 1][j] + down[i][j] - up[i - 1][j];
}
int main() {
  long long int i, j, a, b;
  init();
  getup();
  getdown();
  getleft();
  getright();
  getf();
  a = b = k;
  for (i = k; i <= n - k + 1; i++)
    for (j = k; j <= m - k + 1; j++)
      if (f[i][j] > f[a][b]) a = i, b = j;
  printf("%d %d\n", (int)a, (int)b);
  return 0;
}
