#include <bits/stdc++.h>
using namespace std;
const int N = 3100;
struct poi {
  int x, y, id;
} a[N], b[N], po[N];
int ne[N], pre[N], r, c, n, m;
long long res, ans = 0;
bool cmp(poi x, poi y) { return x.y < y.y; }
void del(int id) {
  int i, j, k;
  j = id;
  for (i = 1; ((i < m) && (pre[j])); i++, j = pre[j])
    ;
  k = j;
  for (i = 1; i < m; i++) k = ne[k];
  while ((k) && (j != ne[id]) && (k != n + 1)) {
    res -= (long long)(b[j].x - b[pre[j]].x) * (long long)(b[ne[k]].x - b[k].x);
    j = ne[j];
    k = ne[k];
  }
  ne[pre[id]] = ne[id];
  pre[ne[id]] = pre[id];
  ne[0] = pre[0] = 0;
}
int main() {
  int i, j, k, p, top;
  scanf("%d%d%d%d", &r, &c, &n, &m);
  for (i = 1; i <= n; i++) scanf("%d%d", &po[i].x, &po[i].y);
  sort(po + 1, po + n + 1, cmp);
  for (i = 1; i <= n; i++) po[i].id = i;
  ans = 0;
  p = n + 1;
  top = 0;
  for (i = c; i; i--) {
    while ((p > 1) && (po[p - 1].y == i)) {
      p--;
      for (j = 1; j <= top; j++)
        if (a[j].x >= po[p].x) {
          for (k = top; k >= j; k--) a[k + 1] = a[k];
          a[j] = po[p];
          break;
        }
      if (j == top + 1) a[top + 1] = po[p];
      top++;
    }
    res = 0;
    a[top + 1].id = n + 1;
    a[top + 1].x = r + 1;
    for (j = 1; j <= top + 1; j++) b[a[j].id] = a[j];
    for (j = 1; j <= top + 1; j++)
      pre[a[j].id] = a[j - 1].id, ne[a[j].id] = a[j + 1].id;
    k = a[1].id;
    for (j = 1; j < m; j++) k = ne[k];
    j = a[1].id;
    while (k) {
      res += (long long)(r - b[k].x + 1) * (long long)(b[j].x - b[pre[j]].x);
      j = ne[j];
      k = ne[k];
    }
    ans += res;
    k = n + 1;
    for (j = c; j > i; j--) {
      while (po[k - 1].y == j) k--, del(k);
      ans += res;
    }
  }
  cout << ans << endl;
  return 0;
}
