#include <bits/stdc++.h>
using namespace std;
const int N = 3000 + 77;
int n, tr, tc, k, Qx[N], Qy[N], a[N], nxt[N], prv[N], nw, Tr[12], Tl[12];
vector<int> C[N];
long long A, B;
inline int Calc() {
  int r = 1;
  int ans = a[1];
  int t = 0;
  for (int l = 1; l <= tr; l++) {
    while (ans < k) {
      r++;
      ans += a[r];
    }
    t += r - l;
    ans -= a[l];
  }
  return t;
}
inline void Decrease(int id) {
  memset(Tr, 0, sizeof(Tr));
  memset(Tl, 0, sizeof(Tl));
  int nd = id, val = 0;
  while (val < k) {
    Tl[val] = nd - prv[nd];
    nd = prv[nd];
    val += a[nd];
  }
  nd = id;
  val = 0;
  while (val < k) {
    Tr[val] = nxt[nd] - nd;
    nd = nxt[nd];
    val += a[nd];
  }
  for (int i = 0; i < k; i++) {
    if (k - i - a[id] < 0) {
      break;
    }
    nw += Tl[i] * Tr[k - i - a[id]];
  }
  a[id]--;
  if (a[id] == 0) {
    nxt[prv[id]] = nxt[id];
    prv[nxt[id]] = prv[id];
  }
}
inline void Solve(int s) {
  memset(a, 0, sizeof(a));
  memset(nxt, 0, sizeof(nxt));
  memset(prv, 0, sizeof(prv));
  a[0] = a[tr + 1] = k;
  for (int i = s; i <= tc; i++) {
    for (auto x : C[i]) {
      a[x]++;
    }
  }
  prv[1] = 0;
  nxt[tr] = tr + 1;
  for (int i = 2; i <= tr; i++) {
    prv[i] = prv[i - 1];
    if (a[i - 1]) {
      prv[i] = i - 1;
    }
  }
  for (int i = tr - 1; i > 0; i--) {
    nxt[i] = nxt[i + 1];
    if (a[i + 1]) {
      nxt[i] = i + 1;
    }
  }
  nw = Calc();
  A += nw;
  for (int i = tc; i > s; i--) {
    for (auto x : C[i]) {
      Decrease(x);
    }
    A += nw;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> tr >> tc >> n >> k;
  B = tr * (tr + 1) / 2;
  B *= tc * (tc + 1) / 2;
  for (int i = 1; i <= n; i++) {
    cin >> Qx[i] >> Qy[i];
    C[Qy[i]].push_back(Qx[i]);
  }
  for (int i = 1; i <= tc; i++) {
    Solve(i);
  }
  cout << B - A;
  return 0;
}
