#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 3e3 + 10;
int R, C, N, K;
int pred[MAX_N], succ[MAX_N];
pair<int, int> poi[MAX_N];
vector<int> ids_of_line[MAX_N];
stack<int> record_del[MAX_N];
long long ans;
void init() {
  scanf("%d%d%d%d", &R, &C, &N, &K);
  for (int i = 1; i <= N; i++) {
    scanf("%d%d", &poi[i].first, &poi[i].second);
  }
  sort(poi + 1, poi + N + 1, [](pair<int, int> a, pair<int, int> b) {
    return a.second < b.second || a.second == b.second && a.first < b.first;
  });
  poi[N + 1] = make_pair(0, C + 1);
  for (int i = 1; i <= N; i++) {
    ids_of_line[poi[i].first].push_back(i);
  }
}
void erase(int x) {
  succ[pred[x]] = succ[x];
  pred[succ[x]] = pred[x];
}
void reinsert(int x) {
  succ[pred[x]] = x;
  pred[succ[x]] = x;
}
void calc(int x, int y, long long coe, long long &res) {
  if (!x) x = succ[x], y--;
  int cnt = 1, p = x;
  while (pred[p] && cnt < K) {
    p = pred[p];
    cnt++;
  }
  cnt--;
  for (int i = 1; i <= y && x <= N; i++) {
    cnt++;
    if (cnt > K) {
      cnt--;
      p = succ[p];
    }
    if (cnt == K) {
      res += coe * (poi[succ[x]].second - poi[x].second) * (poi[p].second);
    }
    x = succ[x];
  }
}
void solve() {
  for (int i = 1; i <= R; i++) {
    for (int j = 0; j <= N; j++) pred[succ[j] = j + 1] = j;
    for (int j = 1; j <= N; j++) {
      if (poi[j].first < i) {
        erase(j);
      }
    }
    for (int j = R; j >= i; j--) {
      for (int k : ids_of_line[j]) {
        record_del[j].push(k);
        erase(k);
      }
    }
    long long curr = 0;
    for (int j = i; j <= R; j++) {
      while (!record_del[j].empty()) {
        int t = record_del[j].top();
        record_del[j].pop();
        calc(pred[t], K, -1, curr);
        reinsert(t);
        calc(pred[t], K + 1, 1, curr);
      }
      ans += curr;
    }
  }
  printf("%lld\n", ans);
}
int main() {
  init();
  solve();
}
