#include <bits/stdc++.h>
int n, m, k;
int mat[200][200];
int GMax = 0;
int GMove = 0;
int main() {
  scanf("%d %d %d", &n, &m, &k);
  fprintf(stderr, "n,m,k: %d, %d, %d\n", n, m, k);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      scanf("%d", &mat[i][j]);
    }
  }
  for (int i = 0; i < m; i++) {
    int lmax = 0;
    int lmove = 0;
    int move = 0;
    int score = 0;
    for (int j = 0; j < k; j++) {
      score += mat[j][i];
    }
    if (score > lmax) lmax = score;
    for (int j = 0; j < n - k; j++) {
      if (mat[j][i] != 0) move++;
      score -= mat[j][i];
      score += mat[j + k][i];
      if (score > lmax) {
        lmax = score;
        lmove = move;
      }
    }
    fprintf(stderr, "lmax, lmove: %d %d\n", lmax, lmove);
    GMax += lmax;
    GMove += lmove;
  }
  fprintf(stderr, "\nmax, move:");
  printf("%d %d", GMax, GMove);
  return 0;
}
