#include <bits/stdc++.h>
using namespace std;
const int tope = 1002;
int n, m;
long long int k;
long long int v[tope][tope];
long long int d1[tope][tope];
long long int d2[tope][tope];
long long int ver[tope][tope];
long long int hor[tope][tope];
long long int t1[tope][tope];
long long int t2[tope][tope];
long long int t3[tope][tope];
long long int t4[tope][tope];
long long int r[tope][tope];
void escribir(long long int t[tope][tope]) {
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cout << t[i][j] << " ";
    }
    cout << endl;
  }
  cout << endl;
}
long long int cd1(int i, int j) {
  long long int &mem = d1[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == k or j == m - k + 1) {
    for (int d = 0; d < k; d++) mem += v[i - d][j + d];
    return mem;
  }
  mem = cd1(i - 1, j + 1) + v[i][j] - v[i - k][j + k];
  return mem;
}
long long int cd2(int i, int j) {
  long long int &mem = d2[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == k or j == k) {
    for (int d = 0; d < k; d++) mem += v[i - d][j - d];
    return mem;
  }
  mem = cd2(i - 1, j - 1) + v[i][j] - v[i - k][j - k];
  return mem;
}
long long int cver(int i, int j) {
  long long int &mem = ver[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == k) {
    for (int d = 0; d < k; d++) mem += v[i - d][j];
    return mem;
  }
  mem = cver(i - 1, j) + v[i][j] - v[i - k][j];
  return mem;
}
long long int chor(int i, int j) {
  long long int &mem = hor[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (j == k) {
    for (int d = 0; d < k; d++) mem += v[i][j - d];
    return mem;
  }
  mem = chor(i, j - 1) + v[i][j] - v[i][j - k];
  return mem;
}
long long int absoluto(long long int x) {
  if (x < 0) return -x;
  return x;
}
long long int ct1(int i, int j) {
  long long int &mem = t1[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == k and j == k) {
    for (int di = 0; di < k; di++)
      for (int dj = 0; dj < k; dj++)
        if (absoluto(di) + absoluto(dj) < k) mem += v[i - di][j - dj];
    return mem;
  }
  if (j > k) {
    mem = ct1(i, j - 1) - cd1(i, j - k) + cver(i, j);
    return mem;
  }
  mem = ct1(i - 1, j) - cd1(i - 1, j - k + 1) + chor(i, j);
  return mem;
}
long long int ct2(int i, int j) {
  long long int &mem = t2[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == k and j == m - k + 1) {
    for (int di = 0; di < k; di++)
      for (int dj = 0; dj < k; dj++)
        if (absoluto(di) + absoluto(dj) < k) mem += v[i - di][j + dj];
    return mem;
  }
  if (j < m - k + 1) {
    mem = ct2(i, j + 1) - cd2(i, j + k) + cver(i, j);
    return mem;
  }
  mem = ct2(i - 1, j) - cd2(i - 1, j + k - 1) + chor(i, j + k - 1);
  return mem;
}
long long int ct3(int i, int j) {
  long long int &mem = t3[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == n - k + 1 and j == k) {
    for (int di = 0; di < k; di++)
      for (int dj = 0; dj < k; dj++)
        if (absoluto(di) + absoluto(dj) < k) mem += v[i + di][j - dj];
    return mem;
  }
  if (j > k) {
    mem = ct3(i, j - 1) - cd2(i + k - 1, j - 1) + cver(i + k - 1, j);
    return mem;
  }
  mem = ct3(i + 1, j) - cd2(i + k, j) + chor(i, j);
  return mem;
}
long long int ct4(int i, int j) {
  long long int &mem = t4[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == n - k + 1 and j == m - k + 1) {
    for (int di = 0; di < k; di++)
      for (int dj = 0; dj < k; dj++)
        if (absoluto(di) + absoluto(dj) < k) mem += v[i + di][j + dj];
    return mem;
  }
  if (j < m - k + 1) {
    mem = ct4(i, j + 1) - cd1(i + k - 1, j + 1) + cver(i + k - 1, j);
    return mem;
  }
  mem = ct4(i + 1, j) - cd1(i + k, j) + chor(i, j + k - 1);
  return mem;
}
long long int cr(int i, int j) {
  long long int &mem = r[i][j];
  if (mem != -1) return mem;
  mem = 0;
  if (i == k and j == k) {
    for (int di = -k + 1; di <= k - 1; di++)
      for (int dj = -k + 1; dj <= k - 1; dj++)
        if (absoluto(di) + absoluto(dj) < k)
          mem += v[i + di][j + dj] * (k - absoluto(di) - absoluto(dj));
    return mem;
  }
  if (j > k) {
    mem = cr(i, j - 1) - ct1(i, j - 1) - ct3(i, j - 1) + chor(i, j - 1) +
          ct2(i, j) + ct4(i, j) - chor(i, j + k - 1);
    return mem;
  }
  mem = cr(i - 1, j) - ct1(i - 1, j) - ct2(i - 1, j) + cver(i - 1, j) +
        ct3(i, j) + ct4(i, j) - cver(i + k - 1, j);
  return mem;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      cin >> v[i][j];
      d1[i][j] = d2[i][j] = ver[i][j] = hor[i][j] = t1[i][j] = t2[i][j] =
          t3[i][j] = t4[i][j] = r[i][j] = -1;
    }
  }
  int imax = -1, jmax = -1;
  for (int i = k; i <= n - k + 1; i++)
    for (int j = k; j <= m - k + 1; j++)
      if (imax == -1 or cr(imax, jmax) < cr(i, j)) imax = i, jmax = j;
  cout << imax << " " << jmax << endl;
}
