#include <bits/stdc++.h>
using namespace std;
const long long N = 3e3 + 10;
long long r, c, n, K, le[N], ri[N], vis[N], p[N];
pair<long long, long long> a[N];
vector<pair<long long, long long> > R[N], C[N];
long long ans;
long long calc(long long i, long long j, long long x) {
  long long ret = 1ll * (a[x].second - a[le[x]].second) *
                  (c - a[vis[x]].second + 1) * (p[x] - j + 1);
  p[x] = j - 1;
  return ret;
}
signed main() {
  cin >> r >> c >> n >> K;
  for (long long i = 1; i <= n; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y), a[i] = make_pair(x, y);
    R[x].push_back(make_pair(y, i)), C[y].push_back(make_pair(x, i));
  }
  for (long long i = 1; i <= r; i++) sort(R[i].begin(), R[i].end());
  for (long long i = 1; i <= c; i++) sort(C[i].begin(), C[i].end());
  a[n + 1] = make_pair(r + 1, c + 1);
  for (long long i = 1; i <= r; i++) {
    long long cur = 0;
    for (long long j = 1; j <= c; j++)
      for (long long k = 0; k < C[j].size(); k++) {
        pair<long long, long long> t = C[j][k];
        if (t.first >= i) {
          ri[cur] = t.second, le[t.second] = cur, cur = t.second;
          p[cur] = r, vis[cur] = 0;
        }
      }
    ri[cur] = ri[n + 1] = vis[n + 1] = n + 1, p[n + 1] = r;
    cur = 0;
    for (long long j = 1; j <= K; j++) cur = ri[cur];
    for (long long j = ri[0]; j != n + 1; j = ri[j], cur = ri[cur])
      vis[j] = cur;
    for (long long j = r; j >= i; j--)
      for (long long k = 0; k < R[j].size(); k++) {
        pair<long long, long long> t = R[j][k];
        ans += calc(i, j, ri[t.second]), cur = t.second;
        for (long long o = 1; cur && o <= K; o++, cur = le[cur])
          ans += calc(i, j, cur);
        ri[le[t.second]] = ri[t.second], le[ri[t.second]] = le[t.second];
        long long w = cur = ri[cur];
        for (long long o = 1; o <= K - 1; o++) w = ri[w];
        while (cur != ri[t.second]) vis[cur] = w, cur = ri[cur], w = ri[w];
      }
  }
  printf("%lld\n", ans);
  return 0;
}
