#include <bits/stdc++.h>
using namespace std;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const long long LINF = (long long)1e18;
const long double PI = acos((long double)-1);
const long double EPS = 1e-9;
inline long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
inline long long fpow(long long n, long long k, int p = MOD) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
template <class T>
inline int chkmin(T& a, const T& val) {
  return val < a ? a = val, 1 : 0;
}
template <class T>
inline int chkmax(T& a, const T& val) {
  return a < val ? a = val, 1 : 0;
}
inline long long isqrt(long long k) {
  long long r = sqrt(k) + 1;
  while (r * r > k) r--;
  return r;
}
inline long long icbrt(long long k) {
  long long r = cbrt(k) + 1;
  while (r * r * r > k) r--;
  return r;
}
inline void addmod(int& a, int val, int p = MOD) {
  if ((a = (a + val)) >= p) a -= p;
}
inline void submod(int& a, int val, int p = MOD) {
  if ((a = (a - val)) < 0) a += p;
}
inline int mult(int a, int b, int p = MOD) { return (long long)a * b % p; }
inline int inv(int a, int p = MOD) { return fpow(a, p - 2, p); }
inline int sign(long double x) { return x < -EPS ? -1 : x > +EPS; }
inline int sign(long double x, long double y) { return sign(x - y); }
const int maxn = 3000 + 5;
int r, c, n, k;
vector<int> gx[maxn];
int nxt[maxn];
int prv[maxn];
vector<int> li[maxn];
int val[maxn];
int rem(int x, int st, int ed) {
  static int vl[15], vr[15];
  fill_n(vl, 15, 0), fill_n(vr, 15, 0);
  int nvl = 0, nvr = 0;
  if (prv[x] == st) {
    vl[nvl++] = val[x] + 1;
  } else {
    vl[nvl++] = val[x] - val[prv[x]];
  }
  for (int i = 0, it = prv[x]; i < k - 1 && it != st; i++, it = prv[it]) {
    if (prv[it] == st) {
      vl[nvl++] = val[it] + 1;
    } else if (val[it] != val[prv[it]]) {
      vl[nvl++] = val[it] - val[prv[it]];
    } else {
      vl[nvl++] = 0;
    }
  }
  if (nxt[x] == ed) {
    vr[nvr++] = c - val[x];
  } else {
    vr[nvr++] = val[nxt[x]] - val[x];
  }
  for (int i = 0, it = nxt[x]; i < k - 1 && it != ed; i++, it = nxt[it]) {
    if (nxt[it] == ed) {
      vr[nvr++] = c - val[it];
    } else if (val[it] != val[nxt[it]]) {
      vr[nvr++] = val[nxt[it]] - val[it];
    } else {
      vr[nvr++] = 0;
    }
  }
  int res = 0;
  for (int i = (0); i < (k); i++) {
    res += vl[i] * vr[k - i - 1];
  }
  nxt[prv[x]] = nxt[x];
  prv[nxt[x]] = prv[x];
  return res;
}
void solve() {
  cin >> r >> c >> n >> k;
  for (int i = (0); i < (n); i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    gx[x].push_back(y);
  }
  long long ans = 0;
  for (int i = (0); i < (r); i++) {
    static int li[maxn][maxn];
    int nli[maxn];
    fill_n(nli, c, 0);
    int ptr = 0;
    for (int j = (i); j < (r); j++) {
      for (int l = (0); l < (int((gx[j]).size())); l++) {
        int y = gx[j][l];
        li[y][nli[y]++] = ptr;
        val[ptr++] = y;
      }
    }
    int st = ptr, ed = ptr + 1;
    static int v[maxn];
    int nv = 0;
    v[nv++] = st;
    for (int j = (0); j < (c); j++) {
      for (int l = (0); l < (nli[j]); l++) {
        v[nv++] = li[j][l];
      }
    }
    v[nv++] = ed;
    for (int j = (0); j < (nv - 1); j++) {
      int l = v[j];
      int r = v[j + 1];
      nxt[l] = r, prv[r] = l;
    }
    static int rc[maxn];
    int nrc = 0;
    for (int j = (r)-1; j >= (i); j--) {
      int tot = 0;
      for (int l = (int((gx[j]).size())) - 1; l >= (0); l--) {
        int y = gx[j][l];
        tot += rem(--ptr, st, ed);
      }
      rc[nrc++] = tot;
    }
    int tot = c * (c + 1) / 2;
    for (int j = (nrc)-1; j >= (0); j--) {
      tot -= rc[j];
      ans += tot;
    }
  }
  ans = (long long)r * (r + 1) * c * (c + 1) / 4 - ans;
  cout << ans << "\n";
}
int main() {
  int JUDGE_ONLINE = 1;
  if (fopen("in.txt", "r")) {
    JUDGE_ONLINE = 0;
    assert(freopen("in.txt", "r", stdin));
  } else {
  }
  solve();
  if (!JUDGE_ONLINE) {
  }
  return 0;
}
