#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e3 + 5;
multiset<int> s;
vector<int> row[maxn];
long long Ans;
int base[maxn], *col = base + 30;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int r, c, n, k;
  cin >> r >> c >> n >> k;
  for (int i = 1; i <= n; ++i) {
    int x, y;
    cin >> x >> y;
    row[x].emplace_back(y);
  }
  multiset<int>::iterator le, ri;
  for (int i = 1; i <= r; ++i) {
    s.clear();
    long long tmp = 0;
    for (int j = i; j <= r; ++j) {
      for (auto x : row[j]) {
        ri = le = s.emplace(col[0] = x);
        ++ri;
        for (int i = 1; i <= k; ++i) {
          col[-i] = (le == s.begin() ? 0 : *--le);
          col[i] = (ri == s.end() ? c + 1 : *ri++);
        }
        for (int i = 1; i <= k; ++i) {
          tmp += (col[i] - col[i - 1]) * (col[i - k] - col[i - k - 1]);
        }
      }
      Ans += tmp;
    }
  }
  cout << Ans << '\n';
  return 0;
}
