#include<cstdio>
const int maxh=1505;
const int LEN=(1<<20);
bool lightflag;
int mp[maxh][maxh];
bool tag[maxh][maxh];
int h,w,n,m,a,b,c,d,sum;
inline int nec(){
    static char buf[LEN],*p=buf,*e=buf;
    if(p==e){
        if((e=buf+fread(buf,1,LEN,stdin))==buf)return EOF;
        p=buf;
    }
    return *p++;
}
inline bool read(int&x){
    static char neg=0,c=nec();
    neg=0,x=0;
    while((c<'0'||c>'9')&&c!='-'){
        if(c==EOF)return 0;
        c=nec();
    }
    if(c=='-'){
        neg=1;
        c=nec();
    }
    do{x=x*10+c-'0';}while((c=nec())>='0');
    if(neg)x=-x;
    return 1;
}
int main(){
    read(h);read(w);read(n);read(m);
    while(n--){
        read(a);read(b);
        mp[a][b]=1;
    }
    while(m--){
        read(c);read(d);
        mp[c][d]=2;
    }
    for(int i=1;i<=h;++i){
        lightflag=0;
        for(int j=1;j<=w;++j){
            if(mp[i][j]==1)
                tag[i][j]=lightflag=1;
            else if(mp[i][j])
                lightflag=0;
            else tag[i][j]|=lightflag;
        }
        lightflag=0;
        for(int j=w;j;--j){
            if(mp[i][j]==1)
                tag[i][j]=lightflag=1;
            else if(mp[i][j])
                lightflag=0;
            else tag[i][j]|=lightflag;
        }
    }
    for(int j=1;j<=w;++j){
        lightflag=0;
        for(int i=1;i<=h;++i){
            if(mp[i][j]==1)
                tag[i][j]=lightflag=1;
            else if(mp[i][j])
                lightflag=0;
            else tag[i][j]|=lightflag;
        }
        lightflag=0;
        for(int i=h;i;--i){
            if(mp[i][j]==1)
                tag[i][j]=lightflag=1;
            else if(mp[i][j])
                lightflag=0;
            else tag[i][j]|=lightflag;
        }
    }
    for(int i=1;i<=h;++i){
        for(int j=1;j<=w;++j)
            sum+=tag[i][j];
    }
    printf("%d",sum);
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) begin(v),end(v)
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 1000000007;
constexpr bool debug = 0;
//---------------------------------//

int main() {
	int H, W, N, M;
	cin >> H >> W >> N >> M;
	
	vector<vector<pii>> ylis(H); // [y] := (x座標, 電球:0, ブロック:1)
	vector<vector<pii>> xlis(W); // [x] := (y, 同じ)
	
	REP(i, H) {
		ylis[i].emplace_back(-1, 1);
		ylis[i].emplace_back(W, 1);
	}
	REP(i, W) {
		xlis[i].emplace_back(-1, 1);
		xlis[i].emplace_back(H, 1);
	}
	
	set<pii> block;
	
	REP(i, N) { // 電球
		int A, B;
		cin >> A >> B;
		--A; --B;
		ylis[A].emplace_back(B, 0);
		xlis[B].emplace_back(A, 0);
	}
	
	REP(i, M) { // ブロック
		int A, B;
		cin >> A >> B;
		--A; --B;
		ylis[A].emplace_back(B, 1);
		xlis[B].emplace_back(A, 1);
		block.emplace(A, B);
	}
	
	REP(i, H) sort(ALL(ylis[i]));
	REP(i, W) sort(ALL(xlis[i]));
	
	int ans = 0;
	REP(i, H) REP(j, W) {
		if (block.count({i, j}) == 1) continue;
		
		bool ok = false;
		
		{ // x
			auto it = lower_bound(ALL(ylis[i]), pii{j, -1});
			if (it->second == 0) ok = true;
			--it;
			if (it->second == 0) ok = true;
		}
		
		{ // y
			auto it = lower_bound(ALL(xlis[j]), pii{i, -1});
			if (it->second == 0) ok = true;
			--it;
			if (it->second == 0) ok = true;
		}
		
		ans += ok;
	}
	
	cout << ans << endl;
	return 0;
}
