#include <bits/stdc++.h>
using namespace std;
long long r, c, n, k, x, y;
struct FLL {
  struct FLLNode {
    long long nxt;
    long long lst;
    long long x;
    long long y;
    long long id;
    FLLNode(long long n, long long l, long long x, long long y, long long i)
        : nxt(n), lst(l), x(x), y(y), id(i) {}
    bool operator<(const FLLNode& f) const {
      if (y == f.y) return x < f.x;
      return y < f.y;
    }
  };
  FLL(long long xlo, const vector<pair<long long, long long>>& vio) {
    num = 0, fi = 0;
    for (long long i = 0; i < vio.size(); ++i) {
      if (vio[i].first >= xlo) {
        base.push_back(FLLNode(-1, -1, vio[i].first, vio[i].second, num++));
      }
    }
    for (long long i = 0; i < num; ++i) idx_map.push_back(0);
    sort(base.begin(), base.end());
    long long next = 1, last = -1;
    for (long long i = 0; i < base.size(); ++i) {
      base[i].nxt = next++;
      base[i].lst = last++;
      idx_map[base[i].id] = i;
    }
    idx_iterator = idx_map.size() - 1;
  }
  long long NumKApart() {
    if (num < k) return 0;
    long long lo = fi, hi = fi, ans = 0;
    for (long long i = 0; i < k - 1; ++i) hi = base[hi].nxt;
    do {
      long long lb = (lo == fi) ? 0 : base[base[lo].lst].y;
      ans += (c - base[hi].y + 1) * (base[lo].y - lb);
      lo = base[lo].nxt;
      hi = base[hi].nxt;
    } while (hi < base.size());
    return ans;
  }
  long long DeleteNode(long long i) {
    long long amtcut = 0, gapsize = 0, lo = i, hi = i, max_xdout = k;
    while (base[lo].lst != -1) {
      if (gapsize == k - 1) break;
      lo = base[lo].lst;
      gapsize++;
    }
    if (gapsize < k - 1) max_xdout = gapsize + 1;
    for (; gapsize != k - 1; ++gapsize) hi = base[hi].nxt;
    for (long long nxdout = 0; nxdout < max_xdout; ++nxdout) {
      long long lb = (base[lo].lst == -1) ? 0 : base[base[lo].lst].y;
      long long ub =
          (base[hi].nxt == base.size()) ? c + 1 : base[base[hi].nxt].y;
      amtcut += (ub - base[hi].y) * (base[lo].y - lb);
      if (base[hi].nxt == base.size()) break;
      hi = base[hi].nxt;
      lo = base[lo].nxt;
    }
    num--;
    if (i == fi) fi = base[i].nxt;
    if (base[i].nxt != base.size()) base[base[i].nxt].lst = base[i].lst;
    if (base[i].lst != -1) base[base[i].lst].nxt = base[i].nxt;
    return amtcut;
  }
  long long cull(long long xhi) {
    long long ans = 0;
    if (num < k) return -1;
    if (base[idx_map[idx_iterator]].x < xhi) return 0;
    while (base[idx_map[idx_iterator]].x == xhi) {
      ans += DeleteNode(idx_map[idx_iterator]);
      if (num < k) return -1;
      idx_iterator--;
    }
    return ans;
  }
  long long fi;
  vector<FLLNode> base;
  vector<long long> idx_map;
  long long num;
  long long idx_iterator;
};
int main() {
  ios_base::sync_with_stdio(false);
  cin >> r >> c >> n >> k;
  vector<pair<long long, long long>> vio;
  for (long long i = 0; i < n; ++i) {
    cin >> x >> y;
    vio.push_back({x, y});
  }
  sort(vio.begin(), vio.end());
  long long ans = 0;
  for (long long xlo = 1; xlo <= r; xlo++) {
    FLL fll(xlo, vio);
    long long curadd = fll.NumKApart();
    ans += curadd;
    for (long long xhi = r; xhi >= xlo; xhi--) {
      long long next = fll.cull(xhi);
      if (next == -1) {
        break;
      } else {
        curadd -= next;
        ans += curadd;
      }
    }
  }
  cout << ans << endl;
}
