#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch - '0' < 0 || ch - '0' > 9) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch - '0' >= 0 && ch - '0' <= 9) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, m, c, K, top;
struct P {
  int x, y;
} p[3010];
int a[3010];
vector<int> v[3010];
bool cmp(int x, int y) { return p[x].y < p[y].y; }
int L[3010], R[3010], cnt[3010];
long long ans, sum;
bool dfs(int x, int las) {
  if (!las || !x) return true;
  if (!dfs(L[x], las - 1)) cnt[L[x]] = 0;
  cnt[L[x]] += cnt[x];
  return false;
}
int main() {
  n = read();
  m = read();
  c = read();
  K = read();
  for (int i = 1; i <= c; i++)
    p[i].x = read(), p[i].y = read(), v[p[i].x].push_back(i);
  for (int i = 1; i <= n; i++) {
    top = 0;
    for (int j = 1; j <= c; j++)
      if (p[j].x >= i) a[++top] = j;
    sort(a + 1, a + top + 1, cmp);
    a[top + 1] = c + 1;
    sum = 0;
    for (int j = 0; j <= c + 1; j++) cnt[j] = L[j] = R[j] = 0;
    int now = 0;
    for (int j = 1; j <= m; j++) {
      while (p[a[now + 1]].y == j && now < top) {
        now++;
        L[a[now]] = a[now - 1];
        R[a[now]] = a[now + 1];
      }
      int tmp = a[now];
      for (int k = 1; k <= K - 1; k++) tmp = L[tmp];
      cnt[tmp]++;
    }
    for (int j = 1; j <= top; j++) sum += p[a[j]].y * cnt[a[j]];
    ans += sum;
    for (int j = n; j >= i + 1; j--) {
      for (int k = 0; k < v[j].size(); k++) {
        int x = v[j][k];
        for (int l = 1; l <= K; l++) {
          sum -= cnt[x] * (p[x].y - p[L[x]].y);
          x = L[x];
          if (!x) break;
        }
        dfs(v[j][k], K);
        x = v[j][k];
        L[R[x]] = L[x];
        R[L[x]] = R[x];
      }
      ans += sum;
    }
  }
  cout << ans << endl;
  return 0;
}
