#include <bits/stdc++.h>
int R, C, n, k;
std::pair<int, int> pos[3050];
std::vector<int> pois[3050];
int pre[3050], nxt[3050];
long long ans;
int vis[3050], nowcnt;
inline void del(int p) { pre[nxt[p]] = pre[p], nxt[pre[p]] = nxt[p]; }
int main() {
  scanf("%d%d%d%d", &R, &C, &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d%d", &pos[i].first, &pos[i].second);
  std::sort(pos + 1, pos + n + 1,
            [](const std::pair<int, int> &A, const std::pair<int, int> &B) {
              return A.second <= B.second;
            });
  for (int i = 1; i <= n; i++) pois[pos[i].first].push_back(i);
  pos[n + 1].second = 0, pos[n + 2].second = C + 1;
  for (int U = 1; U <= R; U++) {
    for (int i = 1; i <= n; i++) pre[i] = i - 1, nxt[i] = i + 1;
    pre[1] = n + 1, pre[n + 1] = 0, nxt[n + 1] = 1;
    nxt[n] = n + 2, nxt[n + 2] = n + 2, pre[n + 2] = n;
    for (int i = 1; i <= n; i++)
      if (pos[i].first < U) del(i);
    nowcnt = 0;
    for (int i = n + 1; i != n + 2; i = nxt[i]) {
      int now = i;
      for (int j = 0; j < k; now = nxt[now], j++)
        ;
      vis[i] =
          (pos[now].second * 2 - pos[i].second - 1LL - pos[nxt[i]].second) *
          (pos[nxt[i]].second - pos[i].second) / 2;
      nowcnt += vis[i];
    }
    for (int i = R; i >= U; i--) {
      ans += nowcnt;
      for (int p : pois[i]) {
        int ppre[k + 1], nnxt[k + 1];
        int pretot = 0, nxttot = 0;
        for (int now = pre[p], j = 0; now && j < k; now = pre[now], j++)
          ppre[++pretot] = now;
        for (int now = nxt[p], j = 0; j < k; now = nxt[now], j++)
          nnxt[++nxttot] = now;
        del(p);
        nowcnt -= vis[p];
        for (int j = 1; j <= pretot; j++) {
          nowcnt -= vis[ppre[j]];
          vis[ppre[j]] =
              (pos[nnxt[k - j + 1]].second * 2 - pos[ppre[j]].second -
               pos[nxt[ppre[j]]].second - 1LL) *
              (pos[nxt[ppre[j]]].second - pos[ppre[j]].second) / 2;
          nowcnt += vis[ppre[j]];
        }
      }
    }
  }
  ans = -ans;
  for (int i = 1; i <= R; i++)
    for (int j = 1; j <= C; j++) ans += (R - i + 1LL) * (C - j + 1LL);
  printf("%lld\n", ans);
}
