#include <bits/stdc++.h>
using namespace std;
const int __SIZE = 1 << 18;
char ibuf[__SIZE], *iS, *iT;
template <typename T>
inline void read(T &x) {
  char ch, t = 0;
  x = 0;
  while (!isdigit(ch = (iS == iT
                            ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                               (iS == iT ? EOF : *iS++))
                            : *iS++)))
    t |= ch == '-';
  while (isdigit(ch))
    x = x * 10 + (ch ^ 48),
    ch = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                      (iS == iT ? EOF : *iS++))
                   : *iS++);
  x = t ? -x : x;
}
inline char read_alpha() {
  char c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                        (iS == iT ? EOF : *iS++))
                     : *iS++);
  while (!isalpha(c) && c != EOF)
    c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin),
                     (iS == iT ? EOF : *iS++))
                  : *iS++);
  return c;
}
inline int read_int() {
  int x;
  return read(x), x;
}
inline long long read_ll() {
  long long x;
  return read(x), x;
}
template <typename T>
inline void chkmin(T &a, T b) {
  a = a < b ? a : b;
}
template <typename T>
inline void chkmax(T &a, T b) {
  a = a > b ? a : b;
}
const int MAXN = 3020;
struct Node {
  int x, y;
  inline void rd() { x = read_int(), y = read_int(); }
  friend bool operator<(Node a, Node b) { return a.y < b.y; }
} a[MAXN];
int L[MAXN];
int R[MAXN];
int sz[MAXN];
int pos[MAXN];
int vis[MAXN];
vector<int> id[MAXN];
inline void Del(int x) { L[R[x]] = L[x], R[L[x]] = R[x]; }
int main() {
  int r = read_int(), c = read_int(), n = read_int(), K = read_int();
  for (int i = 1; i <= n; i++) a[i].rd();
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= n; i++) {
    id[a[i].x].push_back(i);
    pos[i] = a[i].y;
  }
  pos[n + 1] = c + 1;
  long long res = 0;
  for (int i = 1; i <= r; i++) {
    int sum = 0;
    for (int j = 0; j <= n + 1; j++) L[j] = j - 1, R[j] = j + 1;
    R[n + 1] = n + 1, L[0] = 0;
    memset(sz, 0, sizeof(sz));
    for (int j = 1; j <= i; j++)
      for (auto x : id[j]) vis[x] = i;
    for (int j = i + 1; j <= r; j++)
      for (auto x : id[j]) Del(x);
    for (int j = c, las = n + 1, k = n; j >= 1; j--) {
      while (pos[k] >= j) {
        if (vis[k] == i) las = k;
        --k;
      }
      int t = las;
      for (int ct = 1; ct < K; ct++, t = R[t])
        ;
      sz[t]++;
      sum += c - pos[t] + 1;
    }
    res += sum;
    for (int j = 1; j < i; j++) {
      for (auto ps : id[j]) {
        int las = ps, tmp = sz[las];
        for (int ct = 1; ct <= K; ct++) {
          las = R[las];
          int val = sz[las];
          sz[las] += tmp, sz[L[las]] -= tmp;
          sum -= tmp * (pos[las] - pos[L[las]]);
          tmp = val;
          if (las > n) break;
        }
        Del(ps);
      }
      res += sum;
    }
  }
  cout << res << endl;
  return 0;
}
