#include <bits/stdc++.h>
using namespace std;
const int N = 3e3 + 50;
int R, C, n, k;
struct pnt {
  int x, y;
  pnt(int _x = 0, int _y = 0) {
    x = _x;
    y = _y;
  }
  bool operator<(const pnt &a) const {
    return y < a.y || (y == a.y && x < a.x);
  }
} p[N];
int pre[N], suf[N], ct[N];
long long Ans, as;
vector<int> G[N];
void del(int x) {
  int u = x;
  for (int d = k; d && u; d--, u = pre[u])
    as -= (long long)(p[u].y - p[pre[u]].y) * ct[u];
  ct[u] += ct[suf[u]];
  u = suf[u];
  for (; u != x; u = suf[u]) ct[u] = ct[suf[u]];
  pre[suf[x]] = pre[x];
  suf[pre[x]] = suf[x];
}
int main() {
  scanf("%d%d%d%d", &R, &C, &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d%d", &p[i].x, &p[i].y);
  sort(p + 1, p + n + 1);
  p[n + 1].y = C + 1;
  p[0].y = 0;
  for (int u = 1; u <= R; u++) {
    memset(pre, 0, sizeof(int) * (n + 1));
    memset(suf, 0, sizeof(int) * (n + 1));
    memset(ct, 0, sizeof(int) * (n + 1));
    for (int i = 1; i <= u; i++) G[i].clear();
    static int a[N];
    int c = 0;
    int l = 0;
    for (int i = 1; i <= n; i++)
      if (p[i].x <= u)
        a[++c] = i, pre[i] = l, suf[l] = i, l = i, G[p[i].x].push_back(i);
    pre[n + 1] = l;
    suf[l] = n + 1;
    for (int i = 1, t = 0; i <= C; i++) {
      while (p[a[t + 1]].y == i && t < c) ++t;
      int now = a[t];
      for (int d = k - 1; d; d--) now = pre[now];
      ++ct[now];
    }
    as = 0;
    for (int i = 1; i <= c; i++) as += (long long)p[a[i]].y * ct[a[i]];
    Ans += as;
    for (int i = 1; i <= u; i++) {
      for (int t : G[i]) del(t);
      Ans += as;
    }
  }
  cout << Ans;
  return 0;
}
