#include <bits/stdc++.h>
using namespace std;
const int N = 3005;
using ll = long long;
int r, c, n, kk;
struct Node {
  int x, y;
} p[N];
vector<int> v[N];
int pre[N], nxt[N], a[N], cnt[N];
ll ans, sum;
bool dfs(int pos, int dep) {
  if (dep > kk || !pos) return 1;
  if (!dfs(pre[pos], dep + 1)) cnt[pre[pos]] = 0;
  cnt[pre[pos]] += cnt[pos];
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> r >> c >> n >> kk;
  for (int i = 1; i <= n; i++) cin >> p[i].x >> p[i].y, v[p[i].x].push_back(i);
  for (int i = 1; i <= r; i++) {
    int idx = 0;
    for (int j = 1; j <= n; j++)
      if (p[j].x >= i) a[++idx] = j;
    sort(a + 1, a + idx + 1, [](int a, int b) { return p[a].y < p[b].y; });
    a[idx + 1] = n + 1;
    sum = 0;
    for (int j = 0; j <= n + 1; j++) cnt[j] = pre[j] = nxt[j] = 0;
    int ptr = 0;
    for (int j = 1; j <= c; j++) {
      while (ptr < idx && p[a[ptr + 1]].y == j) {
        ++ptr;
        pre[a[ptr]] = a[ptr - 1];
        nxt[a[ptr]] = a[ptr + 1];
      }
      int cur = a[ptr];
      for (int _ = 1; _ < kk; _++) cur = pre[cur];
      ++cnt[cur];
    }
    for (int j = 1; j <= idx; j++) sum += p[a[j]].y * cnt[a[j]];
    ans += sum;
    for (int j = r; j > i; --j, ans += sum)
      for (auto cur : v[j]) {
        int tmp = cur;
        for (int k = 1; k <= kk; k++) {
          sum -= cnt[cur] * p[cur].y;
          sum += cnt[cur] * p[pre[cur]].y;
          cur = pre[cur];
          if (!cur) break;
        }
        dfs(tmp, 1);
        pre[nxt[tmp]] = pre[tmp];
        nxt[pre[tmp]] = nxt[tmp];
      }
  }
  cout << ans << endl;
  return 0;
}
