#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
multiset<int> s;
vector<int> p[N];
int pos[N];
int main() {
  int r, c, n, k;
  scanf("%d%d%d%d", &r, &c, &n, &k);
  for (int i = 1, x, y; i <= n; i++) {
    scanf("%d%d", &x, &y);
    p[x].push_back(y);
  }
  long long ans = 0;
  for (int i = 1; i <= r; i++) {
    s.clear();
    long long res = 0;
    for (int j = i; j <= r; j++) {
      for (int t = 0; t < p[j].size(); t++) {
        multiset<int>::iterator it = s.insert(p[j][t]), lst = it;
        for (int d = k - 1; d >= 0; d--) {
          if (it == s.begin())
            pos[d] = 0;
          else
            pos[d] = (*--it);
        }
        it = lst;
        for (int d = k; d <= k * 2; d++) {
          if (it == s.end())
            pos[d] = c + 1;
          else
            pos[d] = (*it++);
        }
        for (int d = 1; d <= k; d++)
          res += (pos[d] - pos[d - 1]) * (pos[d + k] - pos[d + k - 1]);
      }
      ans += res;
    }
  }
  printf("%lld", ans);
  return 0;
}
