#include <bits/stdc++.h>
using namespace std;
bool home = 1;
signed realMain();
signed main() {
  home = 0;
  if (home) {
    freopen("tony_stark", "r", stdin);
  } else {
    ios::sync_with_stdio(0);
    cin.tie(0);
  }
  realMain();
}
const long long N = 3000 + 7;
long long h, w, pts, k, totalitate[N], acum[N], pt[N], sol, nxt[N],
    prvvvvvvvvvvvvvvvvvvvvvv[N];
vector<long long> pos[N];
void del(long long i) {
  nxt[prvvvvvvvvvvvvvvvvvvvvvv[i]] = nxt[i];
  prvvvvvvvvvvvvvvvvvvvvvv[nxt[i]] = prvvvvvvvvvvvvvvvvvvvvvv[i];
}
signed realMain() {
  cin >> h >> w >> pts >> k;
  for (long long i = 1; i <= pts; i++) {
    long long r, c;
    cin >> r >> c;
    pos[r].push_back(c);
  }
  totalitate[0] = k + 1;
  totalitate[w + 1] = k + 1;
  for (long long lo = h; lo >= 1; lo--) {
    for (auto &j : pos[lo]) {
      totalitate[j]++;
    }
    for (long long j = 0; j <= w + 1; j++) {
      acum[j] = totalitate[j];
      prvvvvvvvvvvvvvvvvvvvvvv[j] = j - 1;
      nxt[j] = j + 1;
    }
    for (long long j = 1; j <= w; j++) {
      if (!acum[j]) {
        del(j);
      }
    }
    long long cur = 0;
    {
      long long j = 1, sum = acum[1];
      for (long long i = 1; i <= w; i++) {
        while (sum < k) {
          j++;
          sum += acum[j];
        }
        pt[i] = j;
        cur += w + 1 - pt[i];
        sum -= acum[i];
      }
    }
    for (long long hi = h; hi >= lo; hi--) {
      sol += cur;
      for (auto &j : pos[hi]) {
        long long lft = j, rgh = j, sumlft = acum[j], sumrgh = 0;
        while (sumlft + sumrgh + acum[nxt[rgh]] <= k) {
          rgh = nxt[rgh];
          sumrgh += acum[rgh];
        }
        while (1) {
          if (sumlft + sumrgh == k) {
            cur -= (lft - prvvvvvvvvvvvvvvvvvvvvvv[lft]) * (nxt[rgh] - rgh);
          }
          lft = prvvvvvvvvvvvvvvvvvvvvvv[lft];
          sumlft += acum[lft];
          if (sumlft > k) {
            break;
          }
          while (sumlft + sumrgh > k) {
            sumrgh -= acum[rgh];
            rgh = prvvvvvvvvvvvvvvvvvvvvvv[rgh];
          }
        }
        acum[j]--;
        if (!acum[j]) {
          del(j);
        }
      }
    }
  }
  cout << sol << "\n";
  return 0;
}
