#include <bits/stdc++.h>
using namespace std;
namespace Dango {
const int MAXN = 3005;
struct node {
  int x, y;
  bool operator<(const node b) const { return x < b.x; }
} p[MAXN];
int r, c, n, k;
long long ans, res;
int cnt[MAXN], sum[MAXN], ll[MAXN], rr[MAXN], link[MAXN];
int read() {
  int x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) {
    f |= (ch == '-');
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return f ? -x : x;
}
int work() {
  r = read();
  c = read();
  n = read();
  k = read();
  for (int i = 1; i <= n; i++) {
    p[i].x = read();
    p[i].y = read();
  }
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= r; i++) {
    for (int j = 1; j <= n && p[j].x <= i; j++) cnt[p[j].y]++;
    for (int j = 0; j <= c + 1; j++) {
      sum[j] = 0;
      ll[j] = j - 1;
      rr[j] = j + 1;
    }
    for (int j = 1; j <= c; j++)
      if (!cnt[j]) {
        ll[rr[j]] = ll[j];
        rr[ll[j]] = rr[j];
      }
    int tmp = 0;
    res = 0;
    for (int j = ll[c + 1], x = c + 1; j; j = ll[j]) {
      tmp += cnt[j];
      while (tmp >= k) {
        x = ll[x];
        tmp -= cnt[x];
      }
      link[j] = x;
      sum[j] = tmp;
      res += (c - link[j] + 1) * (j - ll[j]);
    }
    for (int j = 1, x = 1; j <= i; j++) {
      ans += res;
      while (x <= n && p[x].x <= j) {
        cnt[p[x].y]--;
        for (int e = p[x].y; e && link[e] >= p[x].y; e = ll[e]) {
          if (link[e] > p[x].y) sum[e]--;
          while (link[e] <= c && sum[e] + cnt[link[e]] < k) {
            res += link[e] * (e - ll[e]);
            sum[e] += cnt[link[e]];
            link[e] = rr[link[e]];
            res -= link[e] * (e - ll[e]);
          }
        }
        if (!cnt[p[x].y]) {
          ll[rr[p[x].y]] = ll[p[x].y];
          rr[ll[p[x].y]] = rr[p[x].y];
        }
        x++;
      }
    }
  }
  printf("%lld", ans);
  return 0;
}
}  // namespace Dango
int main() { return Dango::work(); }
