#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define P pair<ll, ll>
#define Graph vector<vector<ll>>
#define fi first
#define se second
#define vvvll vector<vector<vector<ll>>>
#define vvll vector<vector<ll>>
#define vll vector<ll>
#define pqll priority_queue<ll>

constexpr ll INF = (1ll << 60);
constexpr ll mod = 1000000007;  // 998244353;
constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}

void pt_vvll(vvll v) {
    rep(i, v.size()) {
        rep(j, v[0].size()) {
            cout << v[i][j];
            if (j != v[0].size() - 1)
                cout << " ";
            else
                cout << "\n";
        }
    }
}
void pt_vll(vll v) {
    rep(i, v.size()) {
        cout << v[i];
        if (i == v.size() - 1)
            cout << "\n";
        else
            cout << " ";
    }
}

vector<ll> sum, ans;
void pre_process(vector<ll> &a, vector<ll> &s) {  //累積和のvector
    ll n = (ll)a.size();
    s.assign(n + 1, 0);
    for (ll i = 0; i < n; i++) {
        s[i + 1] = s[i] + a[i];
    }
}
ll query(ll i, ll j, vector<ll> &s) {  //区間[i,j]の和
    return (s[j] - s[i]);
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    ll H, W, N, M;
    cin >> H >> W >> N >> M;
    vvll g(H, vll(W));
    vll A(N), B(N), C(M), D(M);
    rep(i, N) {
        cin >> A[i] >> B[i];
        g[--A[i]][--B[i]] = 1;
    }
    rep(i, M) {
        cin >> C[i] >> D[i];
        g[--C[i]][--D[i]] = -1;
    }

    vvll dp1 = g, dp2 = g, dp3 = g, dp4 = g;

    rep(j, W) {
        rep(i, H) {
            if (g[i][j] == -1) continue;
            if (i + 1 < H && g[i + 1][j] != -1) chmax(dp1[i + 1][j], dp1[i][j]);
        }
    }
    for (ll i = H - 1; i >= 0; i--) {
        rep(j, W) {
            if (g[i][j] == -1) continue;
            if (0 <= i - 1 && g[i - 1][j] != -1)
                chmax(dp2[i - 1][j], dp2[i][j]);
        }
    }
    rep(i, H) {
        rep(j, W) {
            if (g[i][j] == -1) continue;
            if (j + 1 < W && g[i][j + 1] != -1) chmax(dp3[i][j + 1], dp3[i][j]);
        }
    }
    rep(i, H) {
        for (ll j = W - 1; j >= 0; j--) {
            if (g[i][j] == -1) continue;
            if (j - 1 >= 0 && g[i][j - 1] != -1)
                chmax(dp4[i][j - 1], dp4[i][j]);
        }
    }
    /*
        cout << "\n";
        cout << "dp1\n";
        pt_vvll(dp1);

        cout << "\n";
        cout << "dp2\n";
        pt_vvll(dp2);
        cout << "\n";
        cout << "dp3\n";
        pt_vvll(dp3);
        cout << "\n";
        cout << "dp4\n";
        pt_vvll(dp4);
        cout << "\n";

        pt_vvll(g);*/
    ll ans = 0;
    rep(i, H) {
        rep(j, W) {
            ll pl = 0;
            if ((dp1[i][j] + dp2[i][j] + dp3[i][j] + dp4[i][j] > 0)) pl = 1;

            ans += pl;
        }
    }

    cout << ans << "\n";
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define deb(k) cerr << #k << ": " << k << "\n";
#define size(a) (int)a.size()
#define fastcin cin.tie(0)->sync_with_stdio(0);
#define st first
#define nd second
#define pb push_back
#define mk make_pair
#define int long long
typedef long double ldbl;
typedef double dbl;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef map<int, int> mii;
typedef vector<int> vint;
#define MAXN 2000
#define MAXLG 20
const int inf = 0x3f3f3f3f;
const ll mod = 1000000007;
const ll linf = 0x3f3f3f3f3f3f3f3f;
const int N = 300100;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int h, w;
int n, m;
set<int>bulb[2][1600], block[2][1600];

bool check(int i, int j, int t){
	auto it = bulb[t][i].lower_bound(j);
	auto it1 = block[t][i].lower_bound(j);
	if(*it1 == j) return false;
	if(it != bulb[t][i].end() && (it1 == block[t][i].end() || *it < *it1)) return true;
	if(it != bulb[t][i].begin() && it1 == block[t][i].begin()) return true;
	if(it != bulb[t][i].begin()){
		it--;
		it1--;
		if(*it > *it1) return true;
	}
	return false;
}

void solve(){
	cin>>h>>w>>n>>m;
	for(int i=0;i<n;i++){
		int x,y;
		cin>>x>>y;
		bulb[0][x].insert(y);
		bulb[1][y].insert(x);
	}
	for(int i=0;i<m;i++){
		int x,y;
		cin>>x>>y;
		block[0][x].insert(y);
		block[1][y].insert(x);
	}
	int ans = 0;
	for(int i=1;i<=h;i++){
		for(int j=1;j<=w;j++){
			if(check(i, j, 0) || check(j, i, 1)){
				ans++;
				//cout<<i<<" "<<j<<"\n";
			}
		}
	}
	cout<<ans<<"\n";


	// Have you read the problem again?
	// Maybe you understood the wrong problem
}

int32_t main(){
	fastcin;
	int t_ = 1;
	//cin>>t_;
	while(t_--)
		solve();
	return 0;
}
