#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
int cnt[N], pre[N], nxt[N], tmp[N], r, c, n, K, nwsum;
struct Point {
  int x, y;
} w[N];
vector<int> pos[N];
long long ans = 0;
void del(int u) { pre[nxt[u]] = pre[u], nxt[pre[u]] = nxt[u]; }
void upd(int u, int K) {
  if (!u || !K) return;
  upd(pre[u], K - 1);
  nwsum -= cnt[u] * (w[u].y - w[pre[u]].y);
  cnt[pre[u]] += cnt[u], cnt[u] = 0;
}
int cmp(const Point &a, const Point &b) {
  return a.y == b.y ? a.x > b.x : a.y < b.y;
}
int main() {
  scanf("%d%d%d%d", &r, &c, &n, &K);
  for (int i = 1; i <= n; i++) scanf("%d%d", &w[i].x, &w[i].y);
  sort(w + 1, w + n + 1, cmp);
  w[n + 1].y = c + 1;
  for (int i = 1; i <= n; i++) pos[w[i].x].push_back(i);
  for (int i = 1; i <= r; i++) {
    int cur = 0, tn = 0;
    for (int j = 1; j <= n; j++)
      if (w[j].x >= i) {
        pre[j] = cur, nxt[cur] = j, cur = j;
        tmp[++tn] = j;
      }
    tmp[tn + 1] = n + 1;
    nwsum = 0;
    for (int j = 1; j <= tn - K + 1; j++)
      cnt[tmp[j]] = w[tmp[j + K]].y - w[tmp[j + K - 1]].y,
      nwsum += w[tmp[j]].y * cnt[tmp[j]];
    for (int j = r; j >= i; j--) {
      ans += nwsum;
      for (int it = pos[j].size() - 1; it >= 0; it--) {
        int u = pos[j][it];
        upd(u, K);
        del(u);
      }
    }
  }
  cout << ans << endl;
}
