#pragma GCC optimize "-O3"

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define rep1(i,n) for(ll i=1;i<=(ll)(n);i++)

int dx[4] = {0,1,0,-1};
int dy[4] = {-1,0,1,0};


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

    int H, W, N, M;
    cin >> H >> W >> N >> M;
    vector<vector<bool>> fi(H, vector<bool>(W, true));
    queue<tuple<int, int, int>> q;
    vector<int> A(N), B(N);
    vector<int> C(M), D(M);
    rep(i,N){
        cin >> A[i] >> B[i];
        --A[i], --B[i];
    }
    rep(i,M){
        cin >> C[i] >> D[i];
        --C[i], --D[i];
        fi[C[i]][D[i]] = false;
    }
std::chrono::system_clock::time_point chrono_start =std::chrono::system_clock::now();

    vector<vector<vector<bool>>> used(4, vector<vector<bool>>(H, vector<bool>(W)));
    rep(i,N){
        used[0][A[i]][B[i]] = true;
        used[1][A[i]][B[i]] = true;
        used[2][A[i]][B[i]] = true;
        used[3][A[i]][B[i]] = true;
        rep(d,4){
            int nh = A[i] + dx[d], nw = B[i] + dy[d];
            if(nh < 0 or nh >= H or nw < 0 or nw >= W or !fi[nh][nw]) continue;
            q.emplace(d, nh, nw);
        }
    }
    int cnt = 0;
    while(!q.empty()){
      cnt++;
        auto [dir, h, w] = q.front(); q.pop();
        if(used[dir][h][w]) continue;
        used[dir][h][w] = true;
        int nh = h + dx[dir], nw = w + dy[dir];
        if(nh < 0 or nh >= H or nw < 0 or nw >= W or !fi[nh][nw]) continue;
        if(used[dir][nh][nw]) continue;
        q.emplace(dir, nh, nw);
    }
    int ans = 0;
    rep(i,H) rep(j,W){
        bool ok = false;
        rep(k,4) if(used[k][i][j]) ok = true;
        if(ok) ans++;
    }
    cout << ans << endl;
  auto chrono_end = std::chrono::system_clock::now();
  cerr << fixed << setprecision(5);
  cerr << std::chrono::duration_cast<std::chrono::milliseconds>(chrono_end - chrono_start).count() << " ms" << endl;
  
  return 0;
    

}

#include <bits/stdc++.h>

#define fst first
#define snd second
#define ll long long
#define ld long double
#define pb push_back
#define emp emplace_back
#define pii pair<int, int>
#define usg unsigned
#define sg signed
#define mp make_pair

using namespace std;

void setIO(){
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);
}

const ld PI = 4*atan((ld)1);
const int INF = 1e9+7;
const ll _INF = 1e18;
const int N = 1507;

int a[N][N];
bool vld[N][N];

int main(){
	setIO();
	int h, w, n, m;
	cin >> h >> w >> n >> m;
	for (int i = 0; i < n; i++){
		int r, c;
		cin >> r >> c;
		a[r][c] = 1;
	}
	for (int i = 0; i < m; i++){
		int r, c;
		cin >> r >> c;
		a[r][c] = -1;
	}
	// right
	for (int i = 1; i <= h; i++){
		bool ok = 0;
		for (int j = 1; j <= w; j++){
			if (a[i][j] == 1) ok = 1;
			else if (a[i][j] == -1) ok = 0;
			vld[i][j] |= ok;
		}
	}
	// left
	for (int i = 1; i <= h; i++){
		bool ok = 0;
		for (int j = w; j >= 1; j--){
			if (a[i][j] == 1) ok = 1;
			else if (a[i][j] == -1) ok = 0;
			vld[i][j] |= ok;
		}
	}
	// down
	for (int i = 1; i <= w; i++){
		bool ok = 0;
		for (int j = 1; j <= h; j++){
			if (a[j][i] == 1) ok = 1;
			else if (a[j][i] == -1) ok = 0;
			vld[j][i] |= ok;
		}
	}
	// up
	for (int i = 1; i <= w; i++){
		bool ok = 0;
		for (int j = h; j >= 1; j--){
			if (a[j][i] == 1) ok = 1;
			else if (a[j][i] == -1) ok = 0;
			vld[j][i] |= ok;
		}
	}
	int ans = 0;
	for (int i = 1; i <= h; i++){
		for (int j = 1; j <= w; j++){
			if (vld[i][j]) ans++;
		}
	}
	cout << ans << endl;
}
