#include <bits/stdc++.h>
using namespace std;
struct Po {
  int x, y, we;
} a[3010], b[3010], c[3010];
int m, n, r, k, nb, ne[3010], la[3010], no[30], xn;
long long ans, num;
bool c1(const Po &x, const Po &y) { return x.x < y.x; }
bool c2(const Po &x, const Po &y) { return x.y < y.y; }
void del(int x) {
  int y = x;
  xn = 0;
  for (int i = 1; i <= k + 2; i++) y = la[y];
  for (int i = y; i != r + 1 && xn <= k * 2 + 5; i = ne[i]) no[++xn] = i;
  for (int i = 2; i + k - 1 <= xn; i++)
    num -= (a[no[i]].y - a[no[i - 1]].y) * (m + 1 - a[no[i + k - 1]].y);
  for (int i = 1; i <= xn; i++)
    if (no[i] == x) {
      for (int j = i + 1; j <= xn; j++) no[j - 1] = no[j];
      xn--;
    }
  for (int i = 2; i + k - 1 <= xn; i++)
    num += (a[no[i]].y - a[no[i - 1]].y) * (m + 1 - a[no[i + k - 1]].y);
  ne[la[x]] = ne[x];
  la[ne[x]] = la[x];
}
int main() {
  cin >> n >> m >> r >> k;
  for (int i = 1; i <= r; i++) {
    cin >> a[i].x >> a[i].y;
  }
  sort(a + 1, a + r + 1, c1);
  a[r + 1] = (Po){n + 1, m + 1, r + 1};
  for (int i = 1; i <= r; i++) a[i].we = i;
  for (int i = 1; i <= r; i++) c[i] = a[i];
  sort(c + 1, c + r + 1, c2);
  for (int i = 1; i <= n; i++) {
    nb = 0;
    for (int j = 1; j <= r; j++)
      if (c[j].x >= i) b[++nb] = c[j];
    b[nb + 1] = (Po){n + 1, m + 1, r + 1};
    for (int j = 0; j <= nb; j++) {
      ne[b[j].we] = b[j + 1].we;
      la[b[j + 1].we] = b[j].we;
    }
    num = 0;
    for (int j = 1; j + k - 1 <= nb; j++)
      num += (b[j].y - b[j - 1].y) * (m + 1 - b[j + k - 1].y);
    for (int j = r; j >= 1; j--) {
      if (a[j].x < i) break;
      ans += num * (a[j + 1].x - a[j].x);
      del(j);
    }
  }
  cerr << 1.0 * clock() / CLOCKS_PER_SEC << endl;
  cout << ans << endl;
  return 0;
}
