#include <bits/stdc++.h>
int X[3010], Y[3010];
struct SJd {
  int z, y, i;
  SJd() {}
  SJd(int Z, int Y, int I) {
    z = Z;
    y = Y;
    i = I;
  }
};
SJd px[3010];
int cmp(const void* A, const void* B) {
  SJd a = *(SJd*)A, b = *(SJd*)B;
  if (a.z != b.z) return b.z - a.z;
  return b.y - a.y;
}
int ss[3010], zl[3010][12], zr[3010][12], r, c, ne[3010], la[3010];
void del(int x) {
  if (la[x] != -1) ne[la[x]] = ne[x];
  if (ne[x] != -1) la[ne[x]] = la[x];
}
void build() {
  for (int i = 1; i <= c + 1; i++) la[i] = (ss[i - 1] ? i - 1 : la[i - 1]);
  for (int i = c; i >= 0; i--) ne[i] = (ss[i + 1] ? i + 1 : ne[i + 1]);
  la[0] = ne[c + 1] = -1;
}
int main() {
  int n, k;
  long long ans = 0;
  scanf("%d%d%d%d", &r, &c, &n, &k);
  for (int i = 0; i < n; i++) scanf("%d%d", &X[i], &Y[i]);
  ss[0] = ss[c + 1] = 1;
  for (int l = 1; l <= r; l++) {
    for (int i = 1; i <= c; i++) ss[i] = 0;
    int m = 0;
    for (int i = 0; i < n; i++) {
      if (X[i] >= l) {
        px[m] = SJd(X[i], Y[i], m);
        ss[Y[i]] += 1;
        m += 1;
      }
    }
    build();
    qsort(px, m, sizeof(SJd), cmp);
    for (int i = 0; i < m; i++) {
      for (int j = 0; j <= k; j++) zl[i][j] = zr[i][j] = -1;
    }
    for (int i = 0; i < m; i++) {
      int x = px[i].y, h = 0;
      while (x != -1 && h + ss[x] <= k + 1) {
        h += ss[x];
        int t = x;
        x = la[x];
        if (x != -1) zl[i][h] = t - x;
      }
      x = ne[px[i].y];
      h = 0;
      zr[i][h] = x - px[i].y;
      while (x != -1 && h + ss[x] <= k + 1) {
        h += ss[x];
        int t = x;
        x = ne[x];
        if (x != -1) zr[i][h] = x - t;
      }
      ss[x = px[i].y] -= 1;
      if (ss[x] == 0) del(x);
    }
    for (int i = 0; i < m; i++) {
      int t = r - px[i].z + 1;
      for (int a = 0; a <= k; a++) {
        if (zl[i][a] != -1 && zr[i][k - a] != -1)
          ans += 1ll * t * zl[i][a] * zr[i][k - a];
      }
    }
  }
  printf("%lld", ans);
  return 0;
}
