#include <bits/stdc++.h>
using namespace std;
const int maxn = 3100;
int r, c, n, k, a[maxn], nn, pre[maxn], nex[maxn], cal[maxn];
long long ans, now;
struct node {
  int x, y;
} p[maxn], q[maxn];
bool cmpy(node a, node b) { return a.y < b.y; }
bool cmp(int a, int b) { return q[a].x > q[b].x; }
int main() {
  cin >> r >> c >> n >> k;
  for (int i = 1; i <= n; i++) scanf("%d%d", &p[i].x, &p[i].y);
  for (int i = 1; i <= r; i++) {
    nn = 0;
    now = 0;
    memset(cal, 0, sizeof(cal));
    for (int j = 1; j <= n; j++)
      if (p[j].x >= i) q[++nn] = p[j], a[nn] = nn;
    sort(q + 1, q + nn + 1, cmpy);
    for (int j = 1; j <= nn - 1; j++) nex[j] = j + 1;
    nex[nn] = 0;
    for (int j = 2; j <= nn; j++) pre[j] = j - 1;
    pre[1] = 0;
    for (int j = k + 1; j <= nn; j++)
      cal[j - 1] = (q[j].y - q[j - 1].y) * q[j - k].y, now += cal[j - 1];
    if (nn >= k) cal[nn] = (c - q[nn].y + 1) * q[nn - k + 1].y;
    now += cal[nn];
    sort(a + 1, a + nn + 1, cmp);
    int w = 1;
    for (int j = r; j >= i; j--) {
      ans += now;
      while (w <= nn && q[a[w]].x == j) {
        int t = a[w];
        now -= cal[t];
        cal[t] = 0;
        int lt = pre[t], rt = nex[t];
        if (lt) nex[lt] = rt;
        if (rt) pre[rt] = lt;
        if (lt)
          rt = lt;
        else
          lt = rt;
        int tt = 1;
        for (; tt < k && pre[lt]; tt++, lt = pre[lt])
          ;
        for (int l = 1; rt && l <= k; l++, rt = nex[rt], tt++) {
          now -= cal[rt];
          cal[rt] = 0;
          if (tt < k) continue;
          if (tt > k) lt = nex[lt], tt--;
          if (nex[rt])
            cal[rt] = (q[nex[rt]].y - q[rt].y) * q[lt].y;
          else
            cal[rt] = (c - q[rt].y + 1) * q[lt].y;
          now += cal[rt];
        }
        w++;
      }
    }
  }
  cout << ans;
  return 0;
}
