#include <bits/stdc++.h>
using namespace std;
const long long maxn = 3e5 + 10;
const long long mod = 1e9 + 7;
const long long base = 1e18;
vector<long long> adj[maxn];
long long pos[maxn];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  if (fopen("INSSORT.inp", "r")) {
    freopen("INSSORT.inp", "r", stdin);
    freopen("INSSORT.out", "w", stdout);
  }
  long long n, m, p, k;
  cin >> n >> m >> p >> k;
  for (int i = 1; i <= p; i++) {
    long long x, y;
    cin >> x >> y;
    adj[x].push_back(y);
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    multiset<long long> st;
    for (int j = 1; j <= k + 1; j++) {
      st.insert(0);
      st.insert(m + 1);
    }
    long long cnt = 0;
    for (int j = i; j <= n; j++) {
      for (auto to : adj[j]) {
        auto t1 = st.insert(to);
        auto t2 = t1;
        for (int t = k; t >= 0; t--) {
          pos[t] = *(t1);
          t1--;
        }
        for (int t = k + 1; t <= 2 * k; t++) {
          t2++;
          pos[t] = *(t2);
        }
        for (int t = k; t < 2 * k; t++) {
          cnt += (pos[t + 1] - pos[t]) * (pos[t - k + 1] - pos[t - k]);
        }
      }
      ans += cnt;
    }
  }
  cout << ans;
}
