#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <utility>
#define rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
#define all(x) (x).begin(),(x).end()
#define inf 1e18

using namespace std;

typedef long long llint;
typedef pair<llint, llint> P;

llint h, w, n, m;
llint a[1505][1505];
bool r[1505][1505];

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> h >> w >> n >> m;
	llint y, x;
	rep(i, 1, n){
		cin >> y >> x;
		a[x][y] = 1;
	}
	rep(i, 1, m){
		cin >> y >> x;
		a[x][y] = -1;
	}
	
	rep(y, 1, h){
		llint b = 0;
		rep(x, 1, w){
			if(a[x][y]) b = a[x][y];
			if(b > 0) r[x][y] = true;
		}
		b = 0;
		for(int x = w; x >= 1; x--){
			if(a[x][y]) b = a[x][y];
			if(b > 0) r[x][y] = true;
		}
	}
	rep(x, 1, w){
		llint b = 0;
		rep(y, 1, h){
			if(a[x][y]) b = a[x][y];
			if(b > 0) r[x][y] = true;
		}
		b = 0;
		for(int y = h; y >= 1; y--){
			if(a[x][y]) b = a[x][y];
			if(b > 0) r[x][y] = true;
		}
	}
	
	llint ans = 0;
	rep(y, 1, h){
		rep(x, 1, w){
			if(r[x][y]) ans++;
		}
	}
	cout << ans << endl;
	
	return 0;
}
#include<bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimization ("unroll-loops")
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
      cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
      const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
//#define int long long
const int N=1505;
int h,w,n,m,a[N][N],cnt[N][N];
int32_t main(){
    ios_base:: sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    cin>>n>>m>>h>>w;
    for(int i=1;i<=h;i++){
        int r,c;cin>>r>>c;
        a[r][c]=1;
    }
    for(int i=1;i<=w;i++){
        int r,c;cin>>r>>c;
        a[r][c]=-1;
    }

    for(int i=1;i<=n;i++){
        for(int j=1,flg=0;j<=m;j++){
            if(a[i][j]==1)flg=1;
            else if(a[i][j]==-1)flg=0;
            cnt[i][j]|=flg;
        }
        for(int j=m,flg=0;j>=1;j--){
            if(a[i][j]==1)flg=1;
            else if(a[i][j]==-1)flg=0;
            cnt[i][j]|=flg;
        }
    }

    for(int j=1;j<=m;j++){
        for(int i=1,flg=0;i<=n;i++){
            if(a[i][j]==1)flg=1;
            else if(a[i][j]==-1)flg=0;
            cnt[i][j]|=flg;
        }
        for(int i=n,flg=0;i>=1;i--){
            if(a[i][j]==1)flg=1;
            else if(a[i][j]==-1)flg=0;
            cnt[i][j]|=flg;
        }
    }

    int ans = 0;
    for(int i=1;i<=n;i++)for(int j=1;j<=m;j++)ans+=cnt[i][j];
    cout<<ans;

}
