#include <bits/stdc++.h>
using namespace std;
const int N = 3e3 + 5, K = 11;
struct P {
  int x, y;
} p[N];
bool cmp(P a, P b) { return a.y < b.y || a.y == b.y && a.x < b.x; }
int w, h, n, k, L[N], R[N];
vector<int> vec[N], q;
bool in[N];
long long ans, sum;
int calc() {
  if (q.empty()) return 0;
  int ret = 0, lst = 0;
  for (int i = 0; i < (int)q.size() - k + 1; i++) {
    ret += (p[q[i]].y - lst) * (h - p[q[i + k - 1]].y + 1);
    lst = p[q[i]].y;
  }
  return ret;
}
void del(int x) {
  L[R[x]] = L[x];
  R[L[x]] = R[x];
}
int main() {
  scanf("%d%d%d%d", &w, &h, &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d%d", &p[i].x, &p[i].y);
  sort(p + 1, p + n + 1, cmp);
  for (int i = 1; i <= n; i++) vec[p[i].x].push_back(i);
  for (int i = w; i >= 1; i--) {
    for (int t : vec[i]) in[t] = 1;
    q.clear();
    int lst = 0;
    for (int j = 1; j <= n; j++)
      if (in[j]) L[j] = lst, R[lst] = j, q.push_back(j), lst = j;
    sum = calc();
    for (int j = w; j >= i; j--) {
      ans += sum;
      for (int t : vec[j]) {
        q.clear();
        for (int x = L[t], c = 0; x && c <= k; x = L[x], c++) q.push_back(x);
        reverse(q.begin(), q.end());
        q.push_back(t);
        for (int x = R[t], c = 0; x && c <= k; x = R[x], c++) q.push_back(x);
        sum -= calc();
        q.clear();
        for (int x = L[t], c = 0; x && c <= k; x = L[x], c++) q.push_back(x);
        reverse(q.begin(), q.end());
        for (int x = R[t], c = 0; x && c <= k; x = R[x], c++) q.push_back(x);
        sum += calc();
        del(t);
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}
