#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
constexpr long long mod = 1000000007;
const long long INF = mod * mod;
const double eps = 1e-12;
const double pi = acosl(-1.0);
long long mod_pow(long long x, long long n, long long m = mod) {
  if (n < 0) {
    long long res = mod_pow(x, -n, m);
    return mod_pow(res, m - 2, m);
  }
  if (abs(x) >= m) x %= m;
  if (x < 0) x += m;
  long long res = 1;
  while (n) {
    if (n & 1) res = res * x % m;
    x = x * x % m;
    n >>= 1;
  }
  return res;
}
struct modint {
  long long n;
  modint() : n(0) { ; }
  modint(long long m) : n(m) {
    if (n >= mod)
      n %= mod;
    else if (n < 0)
      n = (n % mod + mod) % mod;
  }
  operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
modint operator+=(modint& a, modint b) {
  a.n += b.n;
  if (a.n >= mod) a.n -= mod;
  return a;
}
modint operator-=(modint& a, modint b) {
  a.n -= b.n;
  if (a.n < 0) a.n += mod;
  return a;
}
modint operator*=(modint& a, modint b) {
  a.n = ((long long)a.n * b.n) % mod;
  return a;
}
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, long long n) {
  if (n == 0) return modint(1);
  modint res = (a * a) ^ (n / 2);
  if (n % 2) res = res * a;
  return res;
}
long long inv(long long a, long long p) {
  return (a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p);
}
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }
modint operator/=(modint& a, modint b) {
  a = a / b;
  return a;
}
const int max_n = 1 << 17;
modint fact[max_n], factinv[max_n];
void init_f() {
  fact[0] = modint(1);
  for (int i = 0; i < max_n - 1; i++) {
    fact[i + 1] = fact[i] * modint(i + 1);
  }
  factinv[max_n - 1] = modint(1) / fact[max_n - 1];
  for (int i = max_n - 2; i >= 0; i--) {
    factinv[i] = factinv[i + 1] * modint(i + 1);
  }
}
modint comb(int a, int b) {
  if (a < 0 || b < 0 || a < b) return 0;
  return fact[a] * factinv[b] * factinv[a - b];
}
modint combP(int a, int b) {
  if (a < 0 || b < 0 || a < b) return 0;
  return fact[a] * factinv[a - b];
}
template <typename T, typename U>
struct SegT {
 private:
  int n;
  vector<T> node;
  vector<U> lazy;
  T et;
  U eu;
  function<T(T, T)> f;
  function<T(T, U, int, int)> g;
  function<U(U, U)> h;

 public:
  SegT(vector<T> ori, T _et, U _eu, function<T(T, T)> _f,
       function<T(T, U, int, int)> _g, function<U(U, U)> _h) {
    int sz = ori.size();
    et = _et, eu = _eu;
    f = _f, g = _g, h = _h;
    n = 1;
    while (n < sz) n <<= 1;
    node.resize(2 * n - 1, et);
    lazy.resize(2 * n - 1, eu);
    for (int i = 0; i < sz; i++) {
      node[i + n - 1] = ori[i];
    }
    for (int i = n - 1 - 1; i >= 0; i--) {
      node[i] = f(node[2 * i + 1], node[2 * i + 2]);
    }
  }
  SegT(int sz, T _et, U _eu, function<T(T, T)> _f,
       function<T(T, U, int, int)> _g, function<U(U, U)> _h) {
    et = _et, eu = _eu;
    f = _f, g = _g, h = _h;
    n = 1;
    while (n < sz) n <<= 1;
    node.resize(2 * n - 1, et);
    lazy.resize(2 * n - 1, eu);
  }
  void eval(int k, int l, int r) {
    node[k] = g(node[k], lazy[k], l, r);
    if (r - l > 1) {
      lazy[2 * k + 1] = h(lazy[k], lazy[2 * k + 1]);
      lazy[2 * k + 2] = h(lazy[k], lazy[2 * k + 2]);
    }
    lazy[k] = eu;
  }
  void add(U x, int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    eval(k, l, r);
    if (r <= a || b <= l) return;
    if (a <= l && r <= b) {
      lazy[k] = h(x, lazy[k]);
      eval(k, l, r);
    } else {
      add(x, a, b, k * 2 + 1, l, (l + r) / 2);
      add(x, a, b, k * 2 + 2, (l + r) / 2, r);
      node[k] = f(node[k * 2 + 1], node[k * 2 + 2]);
    }
  }
  T query(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    eval(k, l, r);
    if (r <= a || b <= l) return et;
    if (a <= l && r <= b)
      return node[k];
    else {
      T vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
      T vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
      return f(vl, vr);
    }
  }
  void update(int loc, T x) {
    int k = 0, l = 0, r = n;
    stack<pair<int, int>> st;
    while (k < n - 1) {
      eval(k, l, r);
      st.push({l, r});
      if (loc < (l + r) / 2) {
        k = 2 * k + 1;
        r = (l + r) / 2;
      } else {
        k = 2 * k + 2;
        l = (l + r) / 2;
      }
    }
    eval(k, l, r);
    st.push({l, r});
    node[k] = x;
    while (k > 0) {
      k = (k - 1) / 2;
      st.pop();
      l = st.top().first, r = st.top().second;
      eval(2 * k + 1, l, (l + r) / 2);
      eval(2 * k + 2, (l + r) / 2, r);
      node[k] = f(node[2 * k + 1], node[2 * k + 2]);
    }
  }
};
int trans[3000][3000];
void solve() {
  int h, w, n, k;
  cin >> h >> w >> n >> k;
  vector<vector<int>> vx(h);
  vector<pair<int, int>> vs;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    vx[a].push_back(b);
    vs.push_back({b, a});
  }
  for (int i = 0; i < h; i++) sort((vx[i]).begin(), (vx[i]).end());
  sort((vs).begin(), (vs).end());
  long long ans = 0;
  for (int i = 0; i < h; i++) {
    vector<pair<int, int>> ps;
    for (int j = 0; j < k; j++) ps.push_back({-1, -1});
    for (int j = 0; j < vs.size(); j++) {
      if (vs[j].second >= i) {
        trans[vs[j].second][vs[j].first] = ps.size();
        ps.push_back(vs[j]);
      }
    }
    for (int j = 0; j < k; j++) ps.push_back({w, -1});
    vector<int> memo(ps.size(), w);
    vector<int> pre(ps.size()), las(ps.size());
    for (int i = 0; i < ps.size(); i++) {
      pre[i] = i - 1;
      las[i] = i + 1;
    }
    vector<bool> exi(ps.size(), true);
    function<int(int)> find_pre = [&](int x) {
      if (exi[pre[x]])
        return pre[x];
      else
        return pre[x] = find_pre(pre[x]);
    };
    function<int(int)> find_las = [&](int x) {
      if (exi[las[x]])
        return las[x];
      else
        return las[x] = find_las(las[x]);
    };
    int sum = 0;
    for (int j = k; j < ps.size() - k; j++) {
      memo[j] = ps[j + k - 1].first;
      sum += memo[j] * (ps[j].first - ps[j - 1].first);
    }
    sum += w * (ps[ps.size() - k].first - ps[ps.size() - k - 1].first - 1);
    int preid[15], lasid[15];
    for (int j = h - 1; j >= i; j--) {
      ans += w * w - sum;
      for (int val : vx[j]) {
        int id = trans[j][val];
        int loc = 0;
        int cur = id;
        for (int t = 0; t < k + 1; t++) {
          lasid[loc] = cur;
          loc++;
          if (t < k) cur = find_las(cur);
        }
        loc = 0, cur = id;
        for (int t = 0; t < k + 1; t++) {
          preid[loc] = cur;
          loc++;
          if (t < k) cur = find_pre(cur);
        }
        for (int t = 0; t < k; t++) {
          sum -= memo[preid[t]] * (ps[preid[t]].first - ps[preid[t + 1]].first);
          memo[preid[t]] = ps[lasid[k - t]].first;
          sum += memo[preid[t]] * (ps[preid[t]].first - ps[preid[t + 1]].first);
        }
        exi[id] = false;
      }
    }
  }
  cout << ans << "\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
