#include <bits/stdc++.h>
using namespace std;
const int N = 3030;
vector<int> a[N];
int cnt[N], nxt[N], prv[N];
int main() {
  ios_base::sync_with_stdio(false);
  int r, c, n, k;
  cin >> r >> c >> n >> k;
  for (int _n(n), i(0); i < _n; i++) {
    int x, y;
    cin >> x >> y;
    --x, --y;
    a[x].push_back(y);
  }
  for (int _n(r), x(0); x < _n; x++) sort((a[x]).begin(), (a[x]).end());
  long long ans = (r * (r + 1) / 2) * 1ll * (c * (c + 1) / 2);
  for (int _n(r), i(0); i < _n; i++) {
    memset((cnt), (0), sizeof(cnt));
    for (int j = i; j >= 0; --j) {
      for (int y : a[j]) {
        ++cnt[y];
      }
    }
    int last = -1;
    for (int _n(c), y(0); y < _n; y++) {
      if (cnt[y]) {
        prv[y] = last;
        last = y;
      }
    }
    last = c;
    for (int y = c - 1; y >= 0; --y) {
      if (cnt[y]) {
        nxt[y] = last;
        last = y;
      }
    }
    for (int _n(i + 1), j(0); j < _n; j++) {
      for (int k = (int)a[j].size() - 1; k >= 0; --k) {
        int y = a[j][k];
        --cnt[y];
        if (cnt[y] == 0) {
          if (prv[y] != -1) {
            nxt[prv[y]] = nxt[y];
          }
          if (nxt[y] != c) {
            prv[nxt[y]] = prv[y];
          }
        }
      }
    }
    long long cur = c * (c + 1) / 2;
    for (int j = i; j >= 0; --j) {
      for (int y : a[j]) {
        if (cnt[y] == 0) {
          if (prv[y] != -1) {
            nxt[prv[y]] = y;
          }
          if (nxt[y] != c) {
            prv[nxt[y]] = y;
          }
        }
        ++cnt[y];
        int start = y, sum = cnt[y];
        while (sum < k && prv[start] != -1) {
          sum += cnt[start = prv[start]];
        }
        int end = y;
        while (start <= y) {
          while (sum < k && nxt[end] != c) sum += cnt[end = nxt[end]];
          if (sum < k) break;
          if (sum == k) cur -= (start - prv[start]) * (nxt[end] - end);
          sum -= cnt[start];
          start = nxt[start];
        }
      }
      ans -= cur;
    }
  }
  cout << ans << endl;
  return 0;
}
