#include <bits/stdc++.h>
using namespace std;
int read();
const int N = 3e3 + 5;
int n, k, r, c;
struct Point {
  int x, y, id;
} p[N], q[N];
int id[N];
int pre[N], nxt[N], f[N];
bool cmpx(const Point &a, const Point &b) { return a.x < b.x; }
bool cmpy(const Point &a, const Point &b) { return a.y < b.y; }
long long ans, res;
long long val(int i) { return 1ll * p[f[i]].y * (p[nxt[i]].y - p[i].y); }
void Erase(int x) {
  res -= val(x);
  if (pre[x]) res -= val(pre[x]);
  nxt[pre[x]] = nxt[x];
  pre[nxt[x]] = pre[x];
  if (pre[x]) res += val(pre[x]);
  for (int d = (1); d < (k); ++d) {
    x = nxt[x];
    if (x == n + 1) break;
    if (f[x]) {
      res -= val(x);
      f[x] = pre[f[x]];
      res += val(x);
    }
  }
}
int main() {
  scanf("%d%d%d%d", &r, &c, &n, &k);
  for (int i = (1); i <= (n); ++i) scanf("%d%d", &p[i].x, &p[i].y);
  sort(p + 1, p + n + 1, cmpx);
  for (int i = (1); i <= (n); ++i) q[i] = p[i], q[i].id = i;
  sort(q + 1, q + n + 1, cmpy);
  p[0].y = 0, p[n + 1].y = c + 1;
  for (int i = (1); i <= (r); ++i) {
    res = 0;
    int tot = 0;
    for (int j = (1); j <= (n); ++j)
      if (q[j].x >= i) id[++tot] = q[j].id;
    if (!tot) break;
    id[tot + 1] = n + 1;
    nxt[0] = id[1];
    pre[n + 1] = id[tot];
    for (int j = (1); j <= (tot); ++j) {
      pre[id[j]] = id[j - 1], nxt[id[j]] = id[j + 1];
      if (j >= k) {
        f[id[j]] = id[j - k + 1];
        res += val(id[j]);
      } else
        f[id[j]] = 0;
    }
    ans += res;
    int pos = n;
    for (int j = (r); j >= (i + 1); --j) {
      for (; pos && p[pos].x == j; --pos) Erase(pos);
      ans += res;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
