#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  int f = 0;
  x = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar()) f |= (ch == '-');
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  if (f) x = -x;
}
const int N = 3005;
int L[N], R[N], r, c, n, K, x, y, now, cnt;
multiset<int> s;
vector<int> pos[N];
long long ans, acc;
int main() {
  read(r), read(c);
  read(n), read(K);
  for (int i = (1); i <= (n); i++) {
    read(x), read(y);
    pos[x].push_back(y);
  }
  for (int i = (r); i >= (1); i--) {
    if (pos[i].empty()) {
      acc += (long long)c * (c + 1) / 2;
      ans += acc;
      continue;
    }
    now = (long long)c * (c + 1) / 2, acc = 0;
    s.clear();
    for (int j = (i); j <= (r); j++) {
      for (auto p : pos[j]) {
        auto it = s.insert(p), L = it, R = it;
        int cnt = 1;
        while (L != s.begin() && cnt < K) L--, ++cnt;
        while (R != s.end() && cnt < K) R++, ++cnt;
        while (R != s.end()) {
          auto t = L;
          int l = (L == s.begin() ? *L : *L - *(--t));
          t = R, t++;
          int r = (t == s.end() ? c + 1 - *R : *t - *R);
          now -= l * r;
          if (L == it) break;
          ++L, ++R;
        }
      }
      acc += now;
    }
    ans += acc;
  }
  ans = (long long)r * (r + 1) * c * (c + 1) / 4 - ans;
  cout << ans << endl;
  return 0;
}
