#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int N = 3005;
vector<int> vec[N];
int n, m, k, p;
long long ans = 0;
int xx[233], *wz = xx + 50;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m >> k >> p;
  for (int i = 1; i <= k; ++i) {
    int x, y;
    cin >> x >> y;
    vec[x].push_back(y);
  }
  for (int r0 = 1; r0 <= n; ++r0) {
    multiset<int> st;
    int s = 0;
    for (int r = r0; r <= n; ++r) {
      for (int x : vec[r]) {
        auto it = st.insert(x), tmp = it;
        for (int c = 1; c <= p; ++c) wz[-c] = (tmp == st.begin() ? 0 : *--tmp);
        tmp = it;
        for (int c = 0; c <= p; ++c) wz[c] = (tmp == st.end() ? m + 1 : *tmp++);
        for (int i = 1; i <= p; ++i)
          s += (wz[i] - wz[i - 1]) * (wz[i - p] - wz[i - p - 1]);
      }
      ans += s;
    }
  }
  cout << ans << '\n';
  return 0;
}
