#include <bits/stdc++.h>
using namespace std;
pair<int, int> num[3005];
vector<int> vt[3005];
int pre[3005], nxt[3005], val[3005];
int cur[3005], lpos[3005];
long long solve(int r, int c, int n, int k, int l) {
  memset(pre, 0, sizeof(pre));
  memset(nxt, 0, sizeof(nxt));
  int cnt = 0, sum = 0;
  for (int i = 1; i <= n; i++)
    if (num[i].second >= l) {
      cur[++cnt] = i;
      val[i] = num[i].first;
      pre[i] = cur[cnt - 1];
      nxt[cur[cnt - 1]] = i;
      lpos[i] = ((cnt >= k) ? cur[cnt - k + 1] : 0);
    }
  val[n + 1] = r + 1;
  pre[n + 1] = cur[cnt];
  nxt[cur[cnt]] = n + 1;
  for (int i = nxt[0]; i != n + 1; i = nxt[i])
    sum += (val[nxt[i]] - val[i]) * val[lpos[i]];
  long long ans = 0;
  for (int i = c; i >= l; i--) {
    ans += sum;
    for (int j = 0; j < vt[i].size(); j++) {
      int x = vt[i][j], u = x;
      for (int t = 1; t <= k && u <= n; t++, u = nxt[u])
        if (lpos[u]) {
          sum -= (val[nxt[u]] - val[u]) * (val[lpos[u]] - val[pre[lpos[u]]]);
          lpos[u] = pre[lpos[u]];
        }
      nxt[pre[x]] = nxt[x];
      pre[nxt[x]] = pre[x];
    }
  }
  return ans;
}
int main() {
  int r, c, n, k;
  scanf("%d%d%d%d", &r, &c, &n, &k);
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    num[i] = pair<int, int>(x, y);
  }
  sort(num + 1, num + n + 1);
  for (int i = 1; i <= n; i++) vt[num[i].second].push_back(i);
  long long ans = 0;
  for (int i = 1; i <= c; i++) ans += solve(r, c, n, k, i);
  printf("%lld\n", ans);
  return 0;
}
