#include <bits/stdc++.h>
using namespace std;
int x[3555], y[3555], cnt[3555], pre[3555], nxt[3555];
vector<int> v, v2[3555];
bool cmp(int a, int b) { return y[a] < y[b]; }
bool dfs(int x, int lef) {
  if ((!x) || (!lef)) return 0;
  if (dfs(pre[x], lef - 1)) cnt[pre[x]] = 0;
  cnt[pre[x]] += cnt[x];
  return 1;
}
int main() {
  int r, c, n, k;
  long long ans = 0;
  scanf("%d%d%d%d", &r, &c, &n, &k);
  for (int i = 1; i <= n; i++)
    scanf("%d%d", &x[i], &y[i]), v2[x[i]].push_back(i);
  y[3001] = c + 1;
  for (int i = 1; i <= r; i++) {
    memset(cnt, 0, sizeof(cnt));
    memset(pre, 0, sizeof(pre));
    memset(nxt, 0, sizeof(nxt));
    v.clear();
    for (int j = 1; j <= n; j++)
      if (x[j] >= i) v.push_back(j);
    if (!v.size()) continue;
    sort(v.begin(), v.end(), cmp);
    long long sum = 0;
    int now = 0;
    for (int j = 1; j < v.size(); j++) pre[v[j]] = v[j - 1];
    pre[v[0]] = 0;
    for (int j = 0; j < ((int)v.size()) - 1; j++) nxt[v[j]] = v[j + 1];
    nxt[v[v.size() - 1]] = 3001;
    for (int j = 1; j <= c; j++) {
      while (now < v.size() && y[v[now]] == j) now++;
      int tmp = now ? v[now - 1] : 0;
      for (int d = k - 2; d >= 0; d--) tmp = pre[tmp];
      cnt[tmp]++;
    }
    for (int j = 0; j < v.size(); j++) sum += y[v[j]] * cnt[v[j]];
    now = 0;
    for (int j = r; j >= i; j--) {
      ans += sum;
      for (int d = 0; d < v2[j].size(); d++) {
        int t = v2[j][d];
        for (int cc = 1; t > 0 && cc <= k; cc++)
          sum -= cnt[t] * (y[t] - y[pre[t]]), t = pre[t];
        dfs(v2[j][d], k);
        t = v2[j][d];
        pre[nxt[t]] = pre[t];
        nxt[pre[t]] = nxt[t];
      }
    }
  }
  cout << ans << endl;
  return 0;
}
