#include <bits/stdc++.h>
using namespace std;
const int maxn = 3007;
int r, c, n, k;
int x, y, nxt[maxn], prv[maxn], le[maxn], cnt[maxn];
vector<int> pos[maxn];
long long ans = 0;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  if (fopen("test.inp", "r"))
    freopen("test.inp", "r", stdin), freopen("test.out", "w", stdout);
  cin >> r >> c >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> x >> y;
    pos[y].push_back(x);
  }
  for (int i = 1; i <= c; i++) {
    set<int> st;
    for (int j = 1; j <= r; j++) cnt[j] = 0, le[j] = 0;
    st.insert(0);
    st.insert(r + 1);
    nxt[0] = r + 1;
    prv[r + 1] = 0;
    long long sum = 0;
    for (int j = i; j <= c; j++) {
      for (auto ahihi : pos[j]) {
        if (!cnt[ahihi]) {
          int ri = *st.upper_bound(ahihi);
          int le = *prev(st.lower_bound(ahihi));
          nxt[le] = ahihi, nxt[ahihi] = ri;
          prv[ri] = ahihi, prv[ahihi] = le;
          sum -= (::le[le]) * (nxt[ahihi] - ahihi);
          st.insert(ahihi);
        }
        cnt[ahihi]++;
        int cur = ahihi, cursum = 0;
        while (cur != 0) {
          cursum += cnt[cur];
          if (cursum >= k) break;
          cur = prv[cur];
        }
        int total = cnt[ahihi];
        if (cur > le[ahihi]) {
          sum += (1ll * cur - le[ahihi]) * (nxt[ahihi] - ahihi),
              le[ahihi] = cur;
        }
        while (true) {
          ahihi = nxt[ahihi];
          total += cnt[ahihi];
          cursum += cnt[ahihi];
          if (ahihi > r || total > k) break;
          while (cur < ahihi && cursum - cnt[cur] >= k) {
            cursum -= cnt[cur];
            cur = nxt[cur];
          }
          if (cur > le[ahihi])
            sum += (1ll * cur - le[ahihi]) * (nxt[ahihi] - ahihi),
                le[ahihi] = cur;
        }
      }
      ans += sum;
    }
  }
  cout << ans;
}
