#include <bits/stdc++.h>
using namespace std;
int r, c, n, k;
long long ans;
vector<int> y[100010];
vector<list<int>::iterator> p[100010];
list<int> l;
inline list<int>::iterator adv(list<int>::iterator i, int n) {
  advance(i, n);
  return i;
}
inline int cal(list<int>::iterator i, list<int>::iterator j) {
  return (*i - *adv(i, -1)) * (c - *j + 1);
}
int main() {
  scanf("%d%d%d%d", &r, &c, &n, &k);
  for (int i = 1; i <= n; i++) {
    int xx, yy;
    scanf("%d%d", &xx, &yy);
    y[xx].push_back(yy);
  }
  for (int i = 1; i <= r; i++) {
    l.clear();
    for (int j = i; j <= r; j++) {
      p[j].clear();
      for (int k = 0; k < y[j].size(); k++) {
        p[j].push_back(l.insert(l.end(), y[j][k]));
      }
    }
    l.sort();
    for (int j = 0; j <= k; j++) {
      l.insert(l.begin(), 0);
      l.insert(l.end(), c + 1);
    }
    int sum = 0;
    for (list<int>::iterator i = ++l.begin(), j = adv(l.begin(), k);
         j != l.end(); ++i, ++j)
      sum += cal(i, j);
    for (int j = r; j >= i; j--) {
      ans += sum;
      for (vector<list<int>::iterator>::iterator vit = p[j].begin();
           vit != p[j].end(); vit++) {
        list<int>::iterator p = *vit, pl = adv(p, -k), pr = adv(p, 2);
        for (list<int>::iterator i = adv(pl, 1), j = p; i != pr; i++, j++)
          sum -= cal(i, j);
        l.erase(p++);
        for (list<int>::iterator i = adv(pl, 1), j = p; i != pr; i++, j++)
          sum += cal(i, j);
      }
    }
  }
  printf("%lld\n", ans);
  return 0;
}
