#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000001;
const long long int LLINF = 1000000000000000001LL;
long long int countPairs(int k, const vector<int> &pos) {
  long long int res = 0;
  for (int i = (0); i <= ((int)(pos).size() - 2); ++i) {
    long long int d = pos[i + 1] - pos[i];
    res += d * (d - 1) / 2;
    int r = min(i + k, (int)(pos).size() - 1);
    res += d * (pos[r] - pos[i + 1]);
  }
  return res;
}
struct MyList {
  int n;
  vector<int> prv, nxt, elem;
  MyList(vector<int> &elem) : n((int)(elem).size()), elem(elem) {
    prv.resize(n);
    for (int i = (0); i <= (n - 1); ++i) prv[i] = i - 1;
    nxt.resize(n);
    for (int i = (0); i <= (n - 1); ++i) nxt[i] = i + 1;
  }
  void del(int i) {
    if (prv[i] != -1) {
      nxt[prv[i]] = nxt[i];
    }
    if (nxt[i] != n) {
      prv[nxt[i]] = prv[i];
    }
  }
};
int main() {
  ios_base::sync_with_stdio(0);
  int r, c, n, k;
  cin >> r >> c >> n >> k;
  vector<vector<int> > rows(r);
  for (int i = (1); i <= (n); ++i) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    rows[x].push_back(y);
  }
  long long int ans = (long long int)r * (r + 1) * c * (c + 1) / 4;
  vector<int> near(2 * k + 1), pos;
  for (int _ = (1); _ <= (k); ++_) {
    pos.push_back(-1);
    pos.push_back(c);
  }
  for (int i = (r - 1); i >= (0); --i) {
    for (int p : rows[i]) {
      pos.push_back(p);
    }
    sort(pos.begin(), pos.end());
    MyList lst(pos);
    vector<vector<int> > iters(c);
    long long int sum = countPairs(k, pos);
    ans -= sum;
    for (int it = (0); it <= ((int)(pos).size() - 1); ++it)
      if (pos[it] >= 0 && pos[it] < c) {
        iters[pos[it]].push_back(it);
      }
    for (int j = (r - 1); j >= (i + 1); --j) {
      for (int p : rows[j]) {
        int it = iters[p].back();
        iters[p].pop_back();
        int itcpy = it;
        for (int ind = (k); ind >= (0); --ind) {
          near[ind] = pos[itcpy];
          itcpy = lst.prv[itcpy];
        }
        lst.del(it);
        it = lst.nxt[it];
        for (int ind = (k + 1); ind <= (2 * k); ++ind) {
          near[ind] = pos[it];
          it = lst.nxt[it];
        }
        sum -= countPairs(k, near);
        near.erase(near.begin() + k);
        sum += countPairs(k, near);
        near.resize(2 * k + 1);
      }
      ans -= sum;
    }
  }
  cout << ans;
  return 0;
}
