#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  char ch = getchar();
  long long s = 0, w = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return s * w;
}
inline long long lowbit(long long x) { return x & (-x); }
struct Point {
  long long x, y;
} a[3010], b[3010];
long long n, m, p, k, tot;
long long l[3010], r[3010], cnt[3010];
long long answer, nowans;
vector<long long> G[3010];
inline long long cmp(Point a, Point b) {
  return a.y < b.y || (a.y == b.y && a.x < b.x);
}
void Erase(long long x, long long k) {
  nowans -= cnt[x] * b[x].y;
  nowans += cnt[x] * b[l[x]].y;
  if (l[x] && k > 1) Erase(l[x], k - 1);
  if (l[x]) cnt[l[x]] += cnt[x];
  cnt[x] = 0;
}
int main() {
  n = read(), m = read(), p = read(), k = read();
  for (register long long i = 1; i <= p; i++) a[i].x = read(), a[i].y = read();
  sort(a + 1, a + p + 1, cmp);
  for (register long long lx = 1; lx <= n; lx++) {
    tot = 0;
    nowans = 0;
    for (register long long i = 1; i <= n; i++) G[i].clear();
    for (register long long i = 1; i <= p; i++)
      if (a[i].x >= lx) {
        b[++tot] = a[i];
        G[a[i].x].push_back(tot);
        l[tot] = tot - 1;
        r[tot] = tot + 1;
        cnt[tot] = 0;
      }
    long long now = 0;
    for (register long long ry = 1; ry <= m; ry++) {
      while (now + 1 <= tot && b[now + 1].y <= ry) now++;
      if (now >= k) cnt[now - k + 1]++, nowans += b[now - k + 1].y;
    }
    answer += nowans;
    for (register long long rx = n; rx >= lx + 1; rx--) {
      for (long long x : G[rx]) {
        Erase(x, k);
        l[r[x]] = l[x];
        r[l[x]] = r[x];
      }
      answer += nowans;
    }
  }
  cout << answer << '\n';
  return 0;
}
