#include <bits/stdc++.h>
using namespace std;
int r, c, n, k, id[3333];
struct vio {
  int id, x, y;
} v[3333], cpy[3333];
bool cmp1(vio A, vio B) { return A.x < B.x; }
bool cmp2(vio A, vio B) { return A.y < B.y; }
struct node {
  int y;
  int pre, nxt;
} l[3333];
long long cal(int i, int k) {
  long long ret = 0LL;
  int p1 = i, p2 = i, t = 0;
  while (l[p1].pre && t < k - 1) p1 = l[p1].pre, t++;
  while (l[p2].nxt && t < k - 1) p2 = l[p2].nxt, t++;
  if (t < k - 1) return ret;
  while (1) {
    if (l[p2].nxt)
      ret += (long long)(l[p1].y - l[l[p1].pre].y) * (l[l[p2].nxt].y - l[p2].y);
    else
      ret += (long long)(l[p1].y - l[l[p1].pre].y) * (c + 1 - l[p2].y);
    if (p1 == i || !l[p2].nxt) break;
    p1 = l[p1].nxt;
    p2 = l[p2].nxt;
  }
  return ret;
}
void del(int i) {
  if (l[i].pre) l[l[i].pre].nxt = l[i].nxt;
  if (l[i].nxt) l[l[i].nxt].pre = l[i].pre;
}
int main(void) {
  scanf("%d %d %d %d", &r, &c, &n, &k);
  for (int i = 0; i < n; i++) scanf("%d %d", &v[i].x, &v[i].y);
  sort(v, v + n, cmp1);
  for (int i = 0; i < n; i++) v[i].id = i;
  memcpy(cpy, v, sizeof(cpy));
  long long ans = 0LL;
  for (int x1 = r; x1; x1--) {
    int cnt = 0;
    long long cur = 0LL;
    for (int i = 0; i < n; i++) {
      if (v[i].x < x1) continue;
      sort(cpy + i, cpy + n, cmp2);
      for (int j = i; j < n; j++) {
        cnt++;
        l[cnt].y = cpy[j].y;
        l[cnt].pre = cnt - 1;
        if (cnt - 1) l[cnt - 1].nxt = cnt;
        l[cnt].nxt = 0;
        id[cpy[j].id] = cnt;
      }
      break;
    }
    for (int i = 1; i + k - 1 <= cnt; i++)
      cur += (long long)(l[i].y - l[i - 1].y) * (c - l[i + k - 1].y + 1);
    int p = n - 1;
    for (int x2 = r; x2 >= x1; x2--) {
      ans += cur;
      while (p >= 0 && v[p].x == x2) {
        cur -= cal(id[p], k);
        del(id[p]);
        p--;
      }
    }
  }
  printf("%I64d\n", ans);
  return 0;
}
