#include <bits/stdc++.h>
using namespace std;
const int Maxn = 110;
int a[Maxn][Maxn], s[Maxn];
int ans, tot;
int n, m, k;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
  return s * w;
}
int main() {
  n = read(), m = read(), k = read();
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) a[i][j] = read();
  for (int j = 1; j <= m; ++j) {
    int sum = 0, cnt = 0;
    for (int i = 1; i <= n; ++i) s[i] = s[i - 1] + a[i][j];
    for (int i = 1; i <= n; ++i) {
      int tmp = s[i + k - 1] - s[i - 1];
      if (tmp > sum || (tmp == sum && s[i - 1] < cnt))
        sum = tmp, cnt = s[i - 1];
    }
    ans += sum, tot += cnt;
  }
  printf("%d %d\n", ans, tot);
  return 0;
}
