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

#define int long long
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define M 1502

int a[M][M];
int b[M][M] = {};


signed main(){
	int h, w;
	cin >> h >> w;
	int n, m;
	cin >> n >> m;

	for(int i = 0;i < n;i++){
		int y, x;
		cin >> y >> x;
		y--; x--;
		a[y][x] = 1;
	}

	for(int i = 0;i < m;i++){
		int y, x;
		cin >> y >> x;
		y--; x--;
		a[y][x] = -1;
	}

	for(int i = 0;i < h;i++){
		int now = 0;
		for(int j = 0;j < w;j++){
			if(a[i][j] == 1){
				now = 1;
			}else if(a[i][j] == -1){
				now = 0;
			}
			b[i][j] += now;
		}
	}

	for(int i = 0;i < h;i++){
		int now = 0;
		for(int j = w-1;j >= 0;j--){
			if(a[i][j] == 1){
				now = 1;
			}else if(a[i][j] == -1){
				now = 0;
			}
			b[i][j] += now;
		}
	}

	for(int j = 0;j < w;j++){
		int now = 0;
		for(int i = 0;i < h;i++){
			if(a[i][j] == 1){
				now = 1;
			}else if(a[i][j] == -1){
				now = 0;
			}
			b[i][j] += now;
		}
	}

	for(int j = 0;j < w;j++){
		int now = 0;
		for(int i = h-1;i >= 0;i--){
			if(a[i][j] == 1){
				now = 1;
			}else if(a[i][j] == -1){
				now = 0;
			}
			b[i][j] += now;
		}
	}

	int ans = 0;
	for(int i = 0;i < h;i++){
		for(int j = 0;j < w;j++){
			ans += min(b[i][j], 1ll);
		}
	}

	cout << ans << endl;

	return 0;
}

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <queue>
#include <stack>
#include <cstdlib>
#include <map>
#include <iomanip>
#include <set>
#include <functional>
#include <stdio.h>
#include <ctype.h>
#include <random>
#include <string.h>
#include <unordered_map>
#include <cstdio>
#include <climits>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long ll;

ll gcd(ll x, ll y) {
	if (y == 0)return x;
	return gcd(y, x%y);
}
ll lcm(ll x, ll y) {
	return x / gcd(x, y)*y;
}
ll kai(ll x, ll y, ll m) {
	ll res = 1;
	for (ll i = x - y + 1; i <= x; i++) {
		res *= i; res %= m;
	}
	return res;
}
ll mod_pow(ll x, ll y, ll m) {
	ll res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}

ll comb(ll x, ll y, ll m) {
	if (y > x)return 0;
	return kai(x, y, m) * mod_pow(kai(y, y, m), m - 2, m) % m;
}

int h, w, n, m, a[500010], b[500010], c[100010], d[100010];
bool bl[1510][1510][4];
int dx[4] = { 0,0,1,-1 }, dy[4] = { 1,-1,0,0 };

signed main() {
	std::random_device rnd;
	std::mt19937_64 mt(rnd());
	cin >> h >> w >> n >> m;
	for (int i = 0; i < n; i++)cin >> a[i] >> b[i];
	for (int i = 0; i < m; i++)cin >> c[i] >> d[i];
	for (int i = 0; i < m; i++)for (int j = 0; j < 4; j++)bl[c[i]][d[i]][j] = true;
	queue<pair<pair<int, int>, int>> que;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 4; j++)que.push(make_pair(make_pair(a[i], b[i]), j)), bl[a[i]][b[i]][j] = true;
	}
	while (!que.empty()) {
		int x = que.front().first.first, y = que.front().first.second, k = que.front().second; que.pop();
		int tx = x + dx[k], ty = y + dy[k];
		if (tx < 1 || h < tx || ty < 1 || w < ty || bl[tx][ty][k])continue;
		bl[tx][ty][k] = true;
		que.push(make_pair(make_pair(tx, ty), k));
	}
	int ans = 0;
	for (int i = 1; i <= h; i++)for (int j = 1; j <= w; j++)if (bl[i][j][0] || bl[i][j][1] || bl[i][j][2] || bl[i][j][3])ans++;
	cout << ans - m << endl;
}