#include <bits/stdc++.h>
using ll = long long;
const long long mod = 1e12 + 7;
const ll N = 3005;
const int base = 400;
using ull = unsigned long long;
using namespace std;
ll n, m, t, k, T, a[N], b[N], ans, u, tong, w, h, nxt[N], pre[N];
vector<ll> adj[N];
pair<ll, ll> p[N];
void sol() {
  cin >> w >> h >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].first >> p[i].second;
    adj[p[i].second].push_back(p[i].first);
  }
  for (int i = 1; i <= h; i++) {
    set<ll> st;
    nxt[0] = w + 1;
    pre[w + 1] = 0;
    tong = 0;
    st.insert(0);
    st.insert(w + 1);
    fill_n(a, w + 3, 0);
    fill_n(b, w + 3, 0);
    for (int j = i; j <= h; j++) {
      for (ll x : adj[j]) {
        if (a[x] == 0) {
          ll r = *(st.upper_bound(x));
          ll l = *(prev(st.lower_bound(x)));
          nxt[l] = x;
          pre[r] = x;
          pre[x] = l;
          nxt[x] = r;
          st.insert(x);
          tong -= b[l] * (r - x);
        }
        ++a[x];
        int cur = x;
        ll total = 0, now = 0;
        while (cur != 0) {
          now += a[cur];
          if (now >= k) break;
          cur = pre[cur];
        }
        if (cur > b[x]) {
          tong += (nxt[x] - x) * (cur - b[x]);
          b[x] = cur;
        }
        total = now;
        total = a[x];
        while (true) {
          x = nxt[x];
          total += a[x];
          now += a[x];
          if (x > w || total > k) break;
          while (cur < x && now - a[cur] >= k) {
            now -= a[cur];
            cur = nxt[cur];
          }
          if (cur > b[x]) {
            tong += (nxt[x] - x) * (cur - b[x]);
            b[x] = cur;
          }
        }
      }
      ans += tong;
    }
  }
  cout << ans;
}
int main() {
  if (fopen("sequence"
            ".in",
            "r")) {
    freopen(
        "sequence"
        ".in",
        "r", stdin);
    freopen(
        "sequence"
        ".out",
        "w", stdout);
  }
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int ntest;
  ntest = 1;
  while (ntest-- > 0) sol();
}
