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

#define asll unsigned long long
#define ll long long
#define ld long double
#define imt int
#define pii pair<int,int>
#define st first
#define nd second
#define psbk(x) push_back(x);
#define For(x,a,b) for(int x=(a);x!=(b+((b-a)/abs(b-a)));x+=(b-a)/abs(b-a))
#define FOR(x,n) for(int x=0;x<(n);x++)
#define m_p make_pair

#define kj <<" "<<
#define kjb <<" ";
#define dg <<","<<
#define ml <<endl;
#define co cout<<
#define ter cout<<endl;
#define sibi cout<<"TES"<<endl;
#define tes(x) cout<<"TES"<<x<<endl;
#define kpr(x) cout<<"("<<x.st dg x.nd <<")" ml
#define kkor(p) cout<<"("<<p.x dg p.y <<")" ml
#define kera(x,m) for( int i = 0;i < m ; i++ ){ cout<<"x["<< i <<"] =" kj x[i] ml}

asll M=1e9+7;
int h,w,n,m;
int p,q,r;

int ma[1505][1505];
int terang[1505][1505];

int main()
{
	
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);cout.tie(0);
	//freopen("stdin.in", "r", stdin)
 	//freopen("stdout.out", "w", stdout)
	srand(time(0));
	cin>>h>>w>>n>>m;
	FOR(i,h+1){
		//hix[i]=0;
		FOR(j,w+1){
			ma[i][j]=1;
			terang[i][j]=0;
			//hiy[j]=0;
		}
	}
	FOR(i,n){
		cin>>p>>q;
		ma[p][q]=2;
		//hiy[q]=1;
	}
	FOR(i,m){
		cin>>p>>q;
		ma[p][q]=0;
	}
	ll ctr=0;
	//c//o "-" ml
	int kai=0;
	For(i,1,h){
		kai=0;
		For(j,1,w){
			if(ma[i][j]==2){
				kai=1;
			}
			else if(ma[i][j]==0){
				kai=0;
			}
			if(kai==1 && ma[i][j]){
				terang[i][j]=1;
			}
		}
	}
	kai=0;
	For(i,1,h){
		kai=0;
		For(j,w,1){
			if(ma[i][j]==2){
				kai=1;
			}
			else if(ma[i][j]==0){
				kai=0;
			}
			if(kai==1 && ma[i][j]){
				terang[i][j]=1;
			}
		}
	}
	kai=0;
	For(j,1,w){
		kai=0;
		For(i,1,h){
			if(ma[i][j]==2){
				kai=1;
			}
			else if(ma[i][j]==0){
				kai=0;
			}
			if(kai==1 && ma[i][j]){
				terang[i][j]=1;
			}
		}
	}
	kai=0;
	For(j,1,w){
		kai=0;
		For(i,h,1){
			if(ma[i][j]==2){
				kai=1;
			}
			else if(ma[i][j]==0){
				kai=0;
			}
			if(kai==1 && ma[i][j]){
				terang[i][j]=1;
			}
		}
	}
	For(i,1,h){
		For(j,1,w){
			//co terang[i][j] kjb;
			if(terang[i][j]){
				ctr++;
			}
		}
		//ter
	}
	co ctr ml

}


#include <stack>
#include <queue>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <set>
#include <tuple>
#include <cmath>
#include <random>
#include <algorithm>
#include <vector>
#include <iostream>
#include <fstream>
#include <chrono>
#include <numeric>

#define fio ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)
#define rng mt19937_64 rnd(chrono::system_clock::now().time_since_epoch().count())

#define ri(...) i64 __VA_ARGS__; rx(__VA_ARGS__)
#define rc(...) char __VA_ARGS__; rx(__VA_ARGS__)
#define rs(...) string __VA_ARGS__; rx(__VA_ARGS__)
#define rvi(x, n) vi x(n); cin >> x
#define rvvi(x, n, m) vvi x(n, vi(m)); cin >> x

#ifndef ONLINE_JUDGE
#define dbg(...) cerr << '[' << #__VA_ARGS__ << "]: "; dbg_log(__VA_ARGS__)
#else
#define dbg(...) ;;
#endif

#define fa(i, v) for (auto &i : v)
#define fi(i, n) for (i32 i = 0; i < n; i++)
#define fp(i, n) for (i32 i = 1; i < n; i++)
#define fr(i, n) for (i32 i = n - 1; i >= 0; i--)
#define fu(i) ri(__i); fi(i, __i)

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

using namespace std;

typedef uint32_t u32;
typedef int32_t i32;
typedef uint64_t u64;
typedef int64_t i64;
#ifdef __SIZEOF_INT128__
typedef __uint128_t u128;
typedef __int128_t i128;
#endif
typedef vector<i64> vi;
typedef vector<vi> vvi;
typedef pair<i64, i64> pi;

template<typename T>
inline istream &operator>>(istream &in, vector<T> &v) {
    fa(x, v) in >> x;
    return in;
}

template<typename T>
inline ostream &operator<<(ostream &out, const vector<T> &v) {
    fa(x, v) out << x << ' ';
    return out;
}

template<typename T>
inline void rx(T &x) {
    cin >> x;
}

template<typename T, typename... R>
inline void rx(T &x, R &... l) {
    cin >> x;
    rx(l...);
}

template<typename T>
inline void dbg_log(const T &x) {
    cerr << x << endl;
}

template<typename T, typename... R>
inline void dbg_log(const T &x, const R &... l) {
    cerr << x << ", ";
    dbg_log(l...);
}

template<typename T>
inline void wl(const T &x) {
    cout << x << '\n';
}

template<typename T, typename... R>
inline void wl(const T &x, const R &... l) {
    cout << x << ' ';
    wl<R...>(l...);
}

int main() {
    fio;

    ri(h, w, n, m);
    vvi mat(h, vi(w));
    fi(i, n) {
        ri(a, b);
        mat[a - 1][b - 1] |= 0x10;
    }
    fi(i, m) {
        ri(c, d);
        mat[c - 1][d - 1] |= 0x20;
    }

    fi(i, h) {
        fp(j, w) {
            if (!(mat[i][j] & 0x30) && (mat[i][j - 1] & 0x11)) {
                mat[i][j] |= 0x01;
            }
        }
        fp(j, w) {
            if (!(mat[i][w - j - 1] & 0x30) && (mat[i][w - j] & 0x12)) {
                mat[i][w - j - 1] |= 0x02;
            }
        }
    }
    fi(j, w) {
        fp(i, h) {
            if (!(mat[i][j] & 0x30) && (mat[i - 1][j] & 0x14)) {
                mat[i][j] |= 0x04;
            }
        }
        fp(i, h) {
            if (!(mat[h - i - 1][j] & 0x30) && (mat[h - i][j] & 0x18)) {
                mat[h - i - 1][j] |= 0x08;
            }
        }
    }
    fa(row, mat) {
        dbg(row);
    }

    i64 res = 0;
    fi(i, h) {
        fi (j, w) {
            if (mat[i][j] & 0x1F) {
                res++;
            }
        }
    }
    wl(res);

    return 0;
}
