#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  char ch = getchar();
  bool f = 0;
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = 1;
  for (; ch >= '0' && ch <= '9'; ch = getchar())
    x = (x << 3) + (x << 1) + (ch ^ 48);
  return f ? -x : x;
}
const int N = 3005;
int r, c, n, k, x[N], y[N], sum[N], a[N], pos[N], cnt, L[N], R[N];
vector<int> vec[N];
long long ans, s, val[N];
inline void del(int x) {
  sum[a[x]]--;
  int le = x, ri;
  s -= val[x];
  val[x] = 0;
  for (int i = (1), end_i = (k); i <= end_i; i++)
    if (L[le]) le = L[le], s -= val[le], val[le] = 0;
  int t = R[x];
  if (!sum[a[x]]) {
    L[R[x]] = L[x], R[L[x]] = R[x];
    s -= val[t], val[t] = 0;
    t = R[t];
    if (le == x) le = R[le];
  }
  if (le == cnt + 1) return;
  ri = le;
  int now = sum[a[le]];
  for (int i = (1), end_i = (k); i <= end_i; i++)
    if (now < k) ri = R[ri], now += sum[a[ri]];
  if (ri == cnt + 1) return;
  for (; le != t && ri != cnt + 1;) {
    s += (val[le] = 1ll * (c - a[ri] + 1) * (a[le] - a[L[le]]));
    now -= sum[a[le]];
    le = R[le];
    for (; now < k && ri <= cnt; ri = R[ri], now += sum[a[ri]])
      ;
    if (ri == cnt + 1) break;
  }
}
int main() {
  r = read();
  c = read();
  n = read();
  k = read();
  for (int i = (1), end_i = (n); i <= end_i; i++)
    x[i] = read(), y[i] = read(), vec[x[i]].push_back(y[i]);
  for (int l = (1), end_i = (r); l <= end_i; l++) {
    cnt = 0;
    s = 0;
    for (int i = (1), end_i = (n); i <= end_i; i++)
      if (x[i] >= l) sum[y[i]]++;
    for (int i = (1), end_i = (c); i <= end_i; i++)
      if (sum[i]) a[++cnt] = i, pos[i] = cnt;
    for (int i = (1), end_i = (cnt); i <= end_i; i++)
      L[i] = i - 1, R[i] = i + 1;
    R[0] = 1;
    R[cnt + 1] = cnt + 1;
    int ri = 0, le = 1, now = 0;
    for (int i = (1), end_i = (k); i <= end_i; i++)
      if (now < k) ri = R[ri], now += sum[a[ri]];
    if (now >= k && ri != cnt + 1) {
      for (int i = (1), end_i = (cnt); i <= end_i; i++) {
        s += (val[le] = 1ll * (c - a[ri] + 1) * (a[le] - a[L[le]]));
        now -= sum[a[le]];
        le = R[le];
        for (; now < k && ri <= cnt; ri = R[ri], now += sum[a[ri]])
          ;
        if (ri == cnt + 1) break;
      }
      for (int d = (r), end_i = (l); d >= end_i; d--) {
        ans += s;
        for (auto v : vec[d]) del(pos[v]);
      }
    }
    for (int i = (0), end_i = (cnt + 1); i <= end_i; i++)
      L[i] = R[i] = a[i] = val[i] = 0;
    for (int i = (1), end_i = (c); i <= end_i; i++) sum[i] = pos[i] = 0;
    cnt = 0;
  }
  printf("%lld", ans);
  return 0;
}
