#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
int n, m, q, k, pos[N];
vector<int> vec[N];
multiset<int> S;
long long ans;
int main() {
  scanf("%d%d%d%d", &n, &m, &q, &k);
  for (int i = 1, x, y; i <= q; ++i) {
    scanf("%d%d", &x, &y);
    vec[x].push_back(y);
  }
  for (int foo = 1; foo <= n; ++foo) {
    long long sum = 0;
    S.clear();
    for (int bar = foo; bar <= n; ++bar) {
      for (auto p : vec[bar]) {
        auto x = S.insert(p), y = x;
        for (int i = k - 1; ~i; --i)
          if (x == S.begin())
            pos[i] = 0;
          else
            pos[i] = *(--x);
        for (int i = k; i <= k + k; ++i)
          if (y == S.end())
            pos[i] = m + 1;
          else
            pos[i] = *(y++);
        for (int i = 1; i <= k; ++i)
          sum += (pos[i] - pos[i - 1]) * (pos[i + k] - pos[i + k - 1]);
      }
      ans += sum;
    }
  }
  printf("%lld\n", ans);
  return 0;
}
