#include <bits/stdc++.h>
using namespace std;
const int N = 3030;
int x[N], y[N];
vector<int> col[N], row[N];
int pos[N][N], v[N], pre[N], nxt[N];
long long ch(int n) {
  if (n < 0) return 0;
  return n * (n - 1) / 2;
}
int main(void) {
  int r, c, n, k;
  scanf("%d %d %d %d", &r, &c, &n, &k);
  for (int i = 0; i < n; i++) scanf("%d %d", x + i, y + i);
  for (int i = 0; i < n; i++) col[y[i]].push_back(x[i]);
  long long ans = 0;
  for (int c1 = 1; c1 <= c; c1++) {
    for (int i = 1; i <= r; i++) row[i].clear();
    for (int c2 = c1; c2 <= c; c2++)
      for (auto x : col[c2]) row[x].push_back(c2);
    int ct = 0;
    v[ct] = 0;
    pre[ct] = ct - 1;
    nxt[ct] = ct + 1;
    ct++;
    for (int i = 1; i <= r; i++)
      for (auto x : row[i]) {
        v[ct] = i;
        pre[ct] = ct - 1;
        nxt[ct] = ct + 1;
        pos[i][x] = ct++;
      }
    for (int x = 0; x <= k * 2; x++) {
      v[ct] = r + 1;
      pre[ct] = ct - 1;
      nxt[ct] = ct + 1;
      ct++;
    }
    long long tot = 0;
    for (int i = 1; i < ct - 1; i++) {
      int r = i + k - 1;
      if (r >= ct) break;
      tot += ch(v[i] - v[i - 1]);
      tot += (v[i] - v[i - 1]) * (v[r] - v[i]);
    }
    ans += tot;
    for (int c2 = c; c2 > c1; c2--) {
      for (auto x : col[c2]) {
        {
          int p = pos[x][c2];
          p = nxt[p];
          int r = p;
          for (int i = 0; i < k - 1; i++) r = nxt[r];
          for (int it = 0; it < k + 2; it++) {
            if (!p) break;
            tot -= ch(v[p] - v[pre[p]]);
            tot -= (v[p] - v[pre[p]]) * (v[r] - v[p]);
            r = pre[r];
            p = pre[p];
          }
        }
        {
          int p = pos[x][c2];
          int l1 = pre[p], n1 = nxt[p];
          nxt[l1] = n1;
          pre[n1] = l1;
          p = n1;
          int r = p;
          for (int i = 0; i < k - 1; i++) r = nxt[r];
          for (int it = 0; it < k + 1; it++) {
            if (!p) break;
            tot += ch(v[p] - v[pre[p]]);
            tot += (v[p] - v[pre[p]]) * (v[r] - v[p]);
            r = pre[r];
            p = pre[p];
          }
        }
      }
      ans += tot;
    }
  }
  cout << ch(r + 1) * ch(c + 1) - ans << endl;
  return 0;
}
