#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<n; i++)
#define rng(i,l,r) for (int i=l; i<r; i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define endl "\n"
#define INF 1000000007 // 1e9+7
#define LINF 1152921504606846976 // 1LL<<60
using namespace std;
using ll = long long;
using P = pair<int,int>;
template <class T> using V = vector<T>;
template<class T> bool chmin(T& a, T b){ if (a > b){ a = b; return true; } return false; }
template<class T> bool chmax(T& a, T b){ if (a < b){ a = b; return true; } return false; }
struct in { template <class T> operator T() { T t; std::cin >> t; return t; } };
int dx[8] = {0,1,0,-1,1,1,-1,-1};
int dy[8] = {1,0,-1,0,1,-1,1,-1};

auto solve() {
   int h = in(), w = in();
   V<V<int>> s(h+1, V<int>(w+1)), t(h+1, V<int>(w+1));

   int n = in();
   int m = in();

   rep(i,n) {
      int a, b;
      cin >> a >> b;
      s[a][b]++;
   }
   rep(i,m) {
      int c, d;
      cin >> c >> d;
      s[c][d]--;
   }

   int state;
   rng(i,1,h+1) {
      state = 0;
      for (auto j=1; j<w+1; j++) {
         if (s[i][j] == 1) state = 1;
         if (s[i][j] == -1) state = 0;
         if (state) t[i][j] = 1;
      }
      state = 0;
      for (auto j=w; j>=1; j--) {
         if (s[i][j] == 1) state = 1;
         if (s[i][j] == -1) state = 0;
         if (state) t[i][j] = 1;
      }
   }
   rng(j,1,w+1) {
      state = 0;
      for (auto i=1; i<h+1; i++) {
         if (s[i][j] == 1) state = 1;
         if (s[i][j] == -1) state = 0;
         if (state) t[i][j] = 1;
      }
      state = 0;
      for (auto i=h; i>=1; i--) {
         if (s[i][j] == 1) state = 1;
         if (s[i][j] == -1) state = 0;
         if (state) t[i][j] = 1;
      }
   }

   int ans = 0;
   rng(i,1,h+1) rng(j,1,w+1) ans += t[i][j];
   return ans;
}

int main() {
   ios::sync_with_stdio(false);
   cin.tie(0);
   cout << solve() << endl;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long ul;
typedef unsigned long long ull;

typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ull> vull;

typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ull, ull> pull;

template<typename T>
using maxheap = priority_queue<T>;
template<typename T>
using minheap = priority_queue<T, vector<T>, greater<>>;

template<class t, class u>
ostream &operator<<(ostream &os, const pair<t, u> &p) {
    os << p.first << " " << p.second;
    return os;
}

template<class t, class u>
istream &operator>>(istream &is, pair<t, u> &p) {
    is >> p.first >> p.second;
    return is;
}

template<typename T>
istream &operator>>(istream &is, vector<T> &v) {
    for (auto &i: v) {
        is >> i;
    }
    return is;
}

template<typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    for (auto i: v) {
        os << i << " ";
    }
    os << endl;
    return os;
}

string f(string &s) {
    return "asd" + s;
}

int main() {
    ios_base::sync_with_stdio(false), cin.tie(nullptr);
//    read the test case from test.txt
//    freopen("test/test1.txt","r", stdin);
//    freopen("test/ans1.txt", "w", stdout);
//    std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
//    program begin
    int h, w, n, m;
    cin >> h >> w >> n >> m;
    vector<vector<int>> v(h, vi(w, 0));
    for (int i = 0; i < n; i++) {
        int a, b;
        cin >> a >> b;
        // bulb
        v[a - 1][b - 1] = 1;
    }
    for (int i = 0; i < m; i++) {
        int a, b;
        cin >> a >> b;
        // block
        v[a - 1][b - 1] = 2;
    }
    int ans = 0;
    map<pii, bool> c;
    for (int i = 0; i < h; i++) {
        int cnt = 0;
        bool bul = false;
        for (int j = 0; j < w; j++) {
            if (v[i][j] == 0) {
                if (bul) {
                    c[pii{i, j}] = true;
                    ans++;
                } else {
                    cnt++;
                }
            } else if (v[i][j] == 2) {
                cnt = 0;
                bul = false;
            } else if (v[i][j] == 1) {
                c[pii{i, j}] = true;

                if (!bul) {
                    for (int t = j - 1; t >= 0; t--) {
                        if (v[i][t] == 0) {
                            c[pii{i, t}] = true;
                        } else {
                            break;
                        }
                    }
                }
                bul = true;
                ans += cnt + 1;
                cnt = 0;
            }
        }
    }
//    cout << ans << endl;
    for (int j = 0; j < w; j++) {
        int cnt = 0;
        bool bul = false;
        for (int i = 0; i < h; i++) {
            if (v[i][j] == 0) {
                if (bul && !c[pii{i, j}]) {
                    ans++;
                } else if (!c[pii{i, j}]) {
                    cnt++;
                }
            } else if (v[i][j] == 2) {
                cnt = 0;
                bul = false;
            } else if (v[i][j] == 1) {
                bul = true;
                ans += cnt;
                if (!c[pii{i, j}]) {
                    ans++;
                }
                cnt = 0;
            }
        }
    }
    cout << ans;
//    program end
//    std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
//    std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count() << "[ms]" << std::endl;
    return 0;
}

