/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author tatsumack
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>

#define int long long
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1001001001001001001ll
#define fcout cout << fixed << setprecision(12)

using namespace std;

typedef pair<int, int> P;

class EAkari {
public:
    void solve(std::istream& cin, std::ostream& cout) {
        int H, W, N, M;
        cin >> H >> W >> N >> M;
        vector<int> A(N), B(N), C(M), D(M);
        vector<vector<int>> block(H, vector<int>(W));
        REP(i, N) {
            cin >> A[i] >> B[i];
            A[i]--, B[i]--;
        }
        REP(i, M) {
            cin >> C[i] >> D[i];
            C[i]--, D[i]--;
            block[C[i]][D[i]] = 1;
        }

        vector<set<pair<int, int>>> sh(W), sw(H);
        REP(i, N) {
            sh[B[i]].insert({A[i], 1});
            sw[A[i]].insert({B[i], 1});
        }
        REP(i, M) {
            sh[D[i]].insert({C[i], 2});
            sw[C[i]].insert({D[i], 2});
        }

        int res = 0;
        REP(i, H) {
            REP(j, W) {
                if (block[i][j]) continue;
                {
                    auto itr = sh[j].upper_bound({i, 0});
                    if (itr != sh[j].end()) {
                        if (itr->second == 1) {
                            res++;
                            continue;
                        }
                    }
                    if (itr != sh[j].begin()) {
                        itr--;
                        if (itr->second == 1) {
                            res++;
                            continue;
                        }
                    }
                }
                {
                    auto itr = sw[i].upper_bound({j, 0});
                    if (itr != sw[i].end()) {
                        if (itr->second == 1) {
                            res++;
                            continue;
                        }
                    }
                    if (itr != sw[i].begin()) {
                        itr--;
                        if (itr->second == 1) {
                            res++;
                            continue;
                        }
                    }
                }
            }
        }
        cout << res << endl;
    }
};


signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    std::istream& in(std::cin);
    std::ostream& out(std::cout);

    EAkari solver;
    solver.solve(in, out);
    return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

#define MP make_pair
#define EACH(i,c) for(auto i: c)
#define SORT(c) sort((c).begin(),(c).end())

#define ALL(a)  (a).begin(),(a).end()

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int a, b, c, d;
	cin >> a >> b >> c >> d;

	cout << a * d - b * c << endl;


	return 0;
}
