#include <bits/stdc++.h>
using namespace std;
const int N = 3011;
int r, c, n, k;
vector<int> e[N];
int cnt[N];
long long ans = 0ll;
int nxt[N], pre[N];
int a[N];
int main() {
  cin >> r >> c >> n >> k;
  for (int i = 1; i <= n; i++) {
    e[i].clear();
  }
  int tl, tr;
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &tl, &tr);
    e[tl].push_back(tr);
  }
  memset(cnt, 0, sizeof(cnt));
  int tem;
  for (int I = r; I >= 1; I--) {
    for (int i = 0; i < (int)e[I].size(); i++) {
      cnt[e[I][i]]++;
    }
    int tj = 0, sum = 0;
    long long cur = 0ll;
    for (int i = 1; i <= c; i++) {
      while (tj < c && sum < k) {
        tj++;
        sum += cnt[tj];
      }
      if (sum >= k) {
        cur += c - tj + 1;
      }
      sum -= cnt[i];
    }
    for (int i = 0; i <= c + 1; i++) {
      nxt[i] = i + 1;
      pre[i] = i - 1;
    }
    for (int i = 1; i <= c; i++) {
      if (cnt[i] == 0) {
        nxt[pre[i]] = nxt[i];
        pre[nxt[i]] = pre[i];
      }
    }
    for (int i = 1; i <= c; i++) {
      a[i] = cnt[i];
    }
    for (int now = r; now >= I; now--) {
      ans += cur;
      for (int f = 0; f < e[now].size(); f++) {
        tem = e[now][f];
        tl = tem;
        tr = tem;
        int sl, sr;
        sl = a[tem];
        sr = 0;
        while (nxt[tr] <= c && sl + sr + a[nxt[tr]] <= k) {
          tr = nxt[tr];
          sr += a[tr];
        }
        while (true) {
          if (sl + sr == k) {
            cur -= (tl - pre[tl]) * (nxt[tr] - tr);
          }
          tl = pre[tl];
          if (tl == 0) break;
          sl += a[tl];
          if (sl > k) break;
          while (sl + sr > k) {
            sr -= a[tr];
            tr = pre[tr];
          }
        }
        a[tem]--;
        if (a[tem] == 0) {
          pre[nxt[tem]] = pre[tem];
          nxt[pre[tem]] = nxt[tem];
        }
      }
    }
  }
  cout << ans;
}
