#include <bits/stdc++.h>
using namespace std;
int inf;
const double eps = 1e-8;
const double pi = acos(-1.0);
template <class T, class T2>
int chkmin(T &a, T2 b) {
  return a > b ? a = b, 1 : 0;
}
template <class T, class T2>
int chkmax(T &a, T2 b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T, class T2>
T mmin(T a, T2 b) {
  return a < b ? a : b;
}
template <class T, class T2>
T mmax(T a, T2 b) {
  return a > b ? a : b;
}
template <class T>
T aabs(T a) {
  return a < 0 ? -a : a;
}
template <class T>
int dcmp(T a, T b) {
  return a > b;
}
template <int *a>
int cmp_a(int first, int second) {
  return a[first] < a[second];
}
template <class T>
bool sort2(T &a, T &b) {
  return a > b ? swap(a, b), 1 : 0;
}
struct __INIT__ {
  __INIT__() {
    fill((unsigned char *)&inf, (unsigned char *)&inf + sizeof(inf), 0x3f);
  }
} __INIT___;
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char first) {
  *oS++ = first;
  if (oS == oT) flush();
}
template <typename A>
inline bool read(A &first) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (first = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    first = first * 10 + (c & 15);
  first *= f;
  return 1;
}
inline bool read(char &first) {
  while ((first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                               (iS == iT ? EOF : *iS++))
                            : *iS++)) == ' ' ||
         first == '\n' || first == '\r')
    ;
  return first != EOF;
}
inline bool read(char *first) {
  while ((*first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                                (iS == iT ? EOF : *iS++))
                             : *iS++)) == '\n' ||
         *first == ' ' || *first == '\r')
    ;
  if (*first == EOF) return 0;
  while (!(*first == '\n' || *first == ' ' || *first == '\r' || *first == EOF))
    *(++first) = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                           : *iS++);
  *first = 0;
  return 1;
}
template <typename A, typename... B>
inline bool read(A &first, B &...second) {
  return read(first) && read(second...);
}
template <typename A>
inline bool write(A first) {
  if (!first) putc('0');
  if (first < 0) putc('-'), first = -first;
  while (first) qu[++qr] = first % 10 + '0', first /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(char first) {
  putc(first);
  return 0;
}
inline bool write(const char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
inline bool write(char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
template <typename A, typename... B>
inline bool write(A first, B... second) {
  return write(first) || write(second...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::putc;
using io ::read;
using io ::write;
pair<int, int> a[3005];
int k, r, c, n;
long long ans;
int xl[3005], xr[3005], val[3005];
vector<int> id[3005];
int cnt;
void del(int first) {
  xl[xr[first]] = xl[first];
  xr[xl[first]] = xr[first];
}
int xs[35], *s = xs + 15;
void readd(int first) {
  xl[xr[first]] = xr[xl[first]] = first;
  s[0] = val[first];
  int second = first;
  for (int i = 1; i <= k; ++i) {
    second = xr[second];
    s[i] = val[second];
  }
  second = first;
  for (int i = 1; i <= k; ++i) {
    second = xl[second];
    s[-i] = val[second];
  }
  for (int i = 0; i < k; ++i) {
    cnt += (s[i + 1] - s[i]) * (s[i - k + 1] - s[i - k]);
  }
}
signed main() {
  read(r, c, n, k);
  for (int i = 1; i <= n; ++i) {
    read(a[i].first, a[i].second);
  }
  sort(a + 1, a + n + 1);
  int at = n;
  val[n + 1] = c + 1;
  xl[0] = 0;
  xr[n + 1] = n + 1;
  for (int i = 1; i <= n; ++i) val[i] = a[i].second;
  for (int first = r; first; --first) {
    while (a[at].first == first) {
      id[a[at].second].emplace_back(at);
      --at;
    }
    int las = 0;
    for (int i = 1; i <= c; ++i) {
      for (auto first : id[i]) {
        xr[las] = first;
        xl[first] = las;
        las = first;
      }
    }
    xr[las] = n + 1;
    xl[n + 1] = las;
    for (int i = n; i > at; --i) {
      del(i);
    }
    int i = at;
    cnt = 0;
    for (int second = first; second <= r; ++second) {
      while (a[i + 1].first == second) {
        readd(++i);
      }
      ans += cnt;
    }
  }
  write(ans, '\n');
  return 0;
}
