#include <bits/stdc++.h>
using namespace std;
template <typename tp>
inline void read(tp& x) {
  x = 0;
  char tmp;
  bool key = 0;
  for (tmp = getchar(); !isdigit(tmp); tmp = getchar()) key = (tmp == '-');
  for (; isdigit(tmp); tmp = getchar()) x = (x << 3) + (x << 1) + (tmp ^ '0');
  if (key) x = -x;
}
template <typename tp>
inline void ckmn(tp& x, tp y) {
  x = x < y ? x : y;
}
template <typename tp>
inline void ckmx(tp& x, tp y) {
  x = x < y ? y : x;
}
const int N = 3010;
int r, c, n, k;
long long ans;
pair<int, int> pla[N];
int las[N], nex[N], num[N], arr[20], acnt;
void solve(int st) {
  for (int i = (1); i <= (c); ++i) num[i] = 0;
  for (int i = (n); i >= (1); --i)
    if (pla[i].first >= st) ++num[pla[i].second];
  for (int i = (1); i <= (c); ++i) las[i] = i - 1;
  for (int i = (1); i <= (c); ++i) nex[i] = i + 1;
  for (int i = (1); i <= (c); ++i)
    if (num[i] == 0) {
      nex[las[i]] = nex[i];
      las[nex[i]] = las[i];
    }
  long long cur = 0;
  for (int i = 1, j = 1, t = 0; i <= c; ++i) {
    t += num[i];
    while (t >= k) t -= num[j++];
    cur += i - j + 1;
  }
  int p = n;
  for (int i = (r); i >= (st); --i) {
    ans += cur;
    while (pla[p].first == i) {
      int y = pla[p--].second;
      --num[y];
      acnt = 0;
      for (int v = 1, t = las[y]; v <= k && t >= 1; ++v, t = las[t])
        arr[++acnt] = t;
      reverse(arr + 1, arr + acnt + 1);
      arr[++acnt] = y;
      for (int v = 1, t = nex[y]; v <= k && t <= c; ++v, t = nex[t])
        arr[++acnt] = t;
      arr[0] = 0, arr[acnt + 1] = c + 1;
      for (int l = 1, r = 1, tmp = 0; r <= acnt; ++r) {
        tmp += num[arr[r]];
        while (tmp >= k) tmp -= num[arr[l++]];
        if (arr[l] <= y && arr[r] >= y && tmp == k - 1)
          cur += (arr[l] - arr[l - 1]) * (arr[r + 1] - arr[r]);
      }
      if (num[y] == 0) {
        las[nex[y]] = las[y];
        nex[las[y]] = nex[y];
      }
    }
  }
}
int main() {
  read(r), read(c), read(n), read(k);
  for (int i = (1); i <= (n); ++i) read(pla[i].first), read(pla[i].second);
  sort(pla + 1, pla + n + 1);
  for (int i = (1); i <= (r); ++i) solve(i);
  ans = 1ll * r * (r + 1) / 2 * c * (c + 1) / 2 - ans;
  cout << ans << endl;
  return 0;
}
