#include <bits/stdc++.h>
std::pair<int, int> p[3003];
int r, c, n, k;
struct chain {
  int next, prev, y, o;
} ch[3003];
int chi[3003];
bool cmp1(const chain &a, const chain &b) { return a.y < b.y; }
int arr[22];
int main() {
  scanf("%d%d%d%d", &r, &c, &n, &k);
  for (int i = 0; i < n; ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    p[i].first = a;
    p[i].second = b;
  }
  std::sort(p, p + n);
  long long int ans = 0;
  for (int i = 0; i < n; ++i)
    if (i == 0 || p[i].first > p[i - 1].first) {
      long long int sum = 0, val = 0;
      ch[n - i].y = c + 1;
      for (int j = i; j < n; ++j) {
        ch[j - i].y = p[j].second;
        ch[j - i].o = j;
      }
      std::sort(ch, ch + n - i + 1, cmp1);
      ch[0].prev = ch[n - i].next = -1;
      for (int j = 0; j < n - i; ++j) ch[j].next = j + 1;
      for (int j = 1; j < n - i + 1; ++j) ch[j].prev = j - 1;
      for (int j = 0; j < n - i; ++j) chi[ch[j].o] = j;
      for (int j = 0; j < n - i; ++j)
        val += (ch[j + 1].y - ch[j].y) * (j - k + 1 >= 0 ? ch[j - k + 1].y : 0);
      sum += val * (r + 1 - p[n - 1].first);
      for (int j = n - 1; j >= i; --j) {
        int f = chi[j];
        static const int base = 11;
        arr[base] = f;
        for (int g = 0; g <= k; ++g) {
          arr[base - 1 - g] = arr[base - g] == -1 ? -1 : ch[arr[base - g]].prev;
        }
        for (int g = 0; g < k; ++g) {
          arr[base + 1 + g] = arr[base + g] == -1 ? -1 : ch[arr[base + g]].next;
        }
        for (int g = -1; g < k; ++g) {
          if (arr[base + g] == -1 || arr[base + g + 1] == -1) continue;
          val -=
              (ch[arr[base + g + 1]].y - ch[arr[base + g]].y) *
              (arr[base + 1 + g - k] != -1 ? ch[arr[base + 1 + g - k]].y : 0);
          switch (g) {
            case 0:
              break;
            case -1:
              val += (ch[arr[base + 1]].y - ch[arr[base + g]].y) *
                     (arr[base + 1 + g - k] != -1 ? ch[arr[base + 1 + g - k]].y
                                                  : 0);
              break;
            default:
              val += (ch[arr[base + g + 1]].y - ch[arr[base + g]].y) *
                     (arr[base + g - k] != -1 ? ch[arr[base + g - k]].y : 0);
              break;
          }
        }
        if (ch[f].prev != -1) ch[ch[f].prev].next = ch[f].next;
        if (ch[f].next != -1) ch[ch[f].next].prev = ch[f].prev;
        if (j > i) sum += val * (p[j].first - p[j - 1].first);
      }
      assert(val == 0);
      ans += sum * (p[i].first - (i == 0 ? 0 : p[i - 1].first));
    }
  printf("%lld\n", ans);
}
