#include <bits/stdc++.h>
using namespace std;
long long r, c, n, k;
pair<long long, long long> a[3005], b[3005];
long long ID[3005], res;
long long f[3005], L[3005], R[3005];
bool cmp(pair<long long, long long> a, pair<long long, long long> b) {
  return make_pair(a.second, a.first) < make_pair(b.second, b.first);
}
void del(long long first, long long k) {
  if (!first) return;
  if (k) {
    del(L[first], k - 1);
    f[L[first]] = (f[L[first]] + f[first]);
    res += b[L[first]].second * f[first];
  }
  if (k) {
    res -= b[first].second * f[first];
    f[first] = 0;
  }
}
long long pos[3005];
signed main() {
  scanf("%lld%lld%lld%lld", &r, &c, &n, &k);
  for (long long i = 1; i <= n; ++i) {
    scanf("%lld%lld", &a[i].first, &a[i].second);
    b[i] = a[i];
  }
  sort(b + 1, b + 1 + n);
  sort(a + 1, a + 1 + n, cmp);
  for (long long i = 1; i <= n; ++i)
    pos[i] = lower_bound(b + 1, b + 1 + n, a[i]) - b;
  b[n + 1].second = c + 1;
  long long ans = 0;
  for (long long u = 1; u <= r; ++u) {
    long long cnt = 0;
    for (long long i = 0; i <= n; ++i) {
      f[i] = 0;
    }
    for (long long i = 1; i <= n; ++i)
      if (a[i].first >= u) {
        long long tmp = ++cnt;
        ID[tmp] = pos[i];
      }
    ID[0] = 0;
    ID[cnt + 1] = n + 1;
    for (long long i = 1; i <= cnt; ++i) {
      L[ID[i]] = ID[i - 1], R[ID[i]] = ID[i + 1];
    }
    L[n + 1] = ID[cnt];
    R[0] = ID[1];
    res = 0;
    for (long long i = 1; i + k - 1 <= cnt; ++i) {
      f[ID[i]] = b[ID[i + k]].second - b[ID[i + k - 1]].second;
      res = (res + b[ID[i]].second * f[ID[i]]);
    }
    ans = (ans + res);
    long long p = n;
    for (long long i = r; i >= u; --i) {
      while (b[p].first >= i) {
        del(p, k);
        assert(R[L[p]] == p);
        assert(L[R[p]] == p);
        R[L[p]] = R[p];
        L[R[p]] = L[p];
        p--;
      }
      ans = (ans + res);
    }
  }
  printf("%lld\n", ans);
  return 0;
}
