#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3010;
int N, M, V, K;
int X[MAXN], Y[MAXN];
vector<int> viola[MAXN];
int ord[MAXN];
bool comp(int a, int b) { return X[a] < X[b]; }
list<int> lst;
list<int>::iterator where[MAXN];
list<int>::iterator reach[MAXN];
long long go(int lt) {
  lst.clear();
  long long cur = 0;
  long long res = 0;
  for (int i = 0; i <= K; i++) {
    lst.push_back(0);
  }
  for (int i = 1; i <= V; i++) {
    int ind = ord[i];
    if (Y[ind] >= lt) {
      lst.push_back(ind);
      where[ind] = prev(lst.end());
    }
  }
  for (int i = 0; i <= K; i++) {
    lst.push_back(V + 1);
  }
  for (auto it = lst.begin(); it != lst.end(); it++) {
    int i = *it;
    if (i == 0 || i == V + 1) {
      continue;
    }
    reach[i] = where[i];
    advance(reach[i], K - 1);
    cur += (X[i] - X[*prev(it)]) * (N + 1 - X[*reach[i]]);
  }
  reach[0] = lst.begin();
  reach[V + 1] = prev(lst.end());
  for (int rt = M; rt >= lt; rt--) {
    res += cur;
    for (int i : viola[rt]) {
      auto it = where[i];
      for (int j = 0; j < K; j++, it--) {
        if (*it == 0) {
          break;
        }
        auto &rit = reach[*it];
        cur -= (X[*it] - X[*prev(it)]) * (X[*next(rit)] - X[*rit]);
        rit++;
      }
      lst.erase(where[i]);
    }
  }
  return res;
}
int main() {
  scanf("%d %d %d %d", &N, &M, &V, &K);
  for (int i = 1; i <= V; i++) {
    scanf("%d %d", &X[i], &Y[i]);
    viola[Y[i]].push_back(i);
    ord[i] = i;
  }
  X[0] = 0;
  X[V + 1] = N + 1;
  sort(ord + 1, ord + V + 1, comp);
  long long ans = 0;
  for (int lt = 1; lt <= M; lt++) {
    ans += go(lt);
  }
  printf("%lld\n", ans);
}
