#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <tuple>
#include <numeric>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 1000000007;
const ll INF = 1e16;

const ll di[4] = {1, 0, -1, 0};
const ll dj[4] = {0, 1, 0, -1};
 
struct Data {
    ll id, x;  // いまの状態id, 移動距離x
    Data(ll id, ll x): id(id), x(x) {}
    bool operator<(const Data& hoge) const {
        return x > hoge.x;
    }
};
 
int main() {
    ll h, w, n, m;
    cin >> h >> w >> n >> m;
    
    vl dp(4*h*w, INF);  // dp[id] : idの状態となる移動距離の最小値(到達不可能ならINF)
    priority_queue<Data> Q;
    auto push = [&](ll id, ll x) {
        if(dp[id] <= x) {
            return;
        }
        dp[id] = x;
        Q.emplace(id, x);
    };
    
    auto toId = [&](ll i, ll j, ll dir) {
        return 4*(i*w + j) + dir;
    };

    rep(i, n) {
        ll a, b;
        cin >> a >> b;
        a--;  b--;
        rep(dir, 4) {
            push(toId(a, b, dir), 0);
        }
    }

    vvl board(h, vl(w));
    rep(i, m) {
        ll c, d;
        cin >> c >> d;
        c--;  d--;
        board[c][d] = 1;
    }
    
    // 拡張ダイクストラ法。計算量はO((V+E)*log(V))
    while(!Q.empty()) {
        Data hoge = Q.top();  
        Q.pop();
        ll id = hoge.id, x = hoge.x;
        if(dp[id] != x) {
            continue;
        }
        ll i = id/4/w;
        ll j = id/4%w;
        ll dir = id%4;
        // 向きを変えずに直進する場合
        ll ni = i + di[dir];
        ll nj = j + dj[dir];
        if(ni < 0 || h <= ni || nj < 0 || w <= nj) {
            continue;
        }
        if(board[ni][nj]) {
            continue;
        }
        push(toId(ni, nj, dir), x+1);
    }
    
    ll ans = 0;
    rep(i, h) {
        rep(j, w) {
            bool ok = false;
            rep(dir, 4) {
                if(dp[toId(i, j, dir)] != INF) {
                    ok = true;   
                }
            }
            if(ok) {
                ans++;
            } 
        }
    }
    
    out(ans);
    re0;
}
#include<iostream>
#include<vector>
#include<cstring>
using namespace std;
int map[1505][1505];           //-1标记block,0暂时没有照亮的地方,1照亮的地方,2标记bulb
typedef struct node {
	int x;
	int y;
}NODE;
int main() {
	int h, w, n, m, ans = 0;
	cin >> h >> w >> n >> m;
	vector<NODE> N, M;
	NODE p;
	memset(map, 0, sizeof(map));
	for (int i = 0; i < n; i++) {
		cin >> p.x >> p.y;
		N.push_back(p);
		map[p.x][p.y] = 2;
	}
	for (int i = 0; i < m; i++) {
		cin >> p.x >> p.y;
		M.push_back(p);
		map[p.x][p.y] = -1;
	}
	//for (auto p : N) {      //暴力遍历求解
	//	int x = p.x, y = p.y;
	//	for (int i = y - 1; i > 0; i--) {
	//		if (map[x][i] == -1) break;
	//		if (map[x][i] == 0) map[x][i] = 1;
	//	}
	//	for (int i = y + 1; i <= w; i++) {
	//		if (map[x][i] == -1) break;
	//		if (map[x][i] == 0) map[x][i] = 1;
	//	}
	//	for (int j = x - 1; j > 0; j--) {
	//		if (map[j][y] == -1) break;
	//		if (map[j][y] == 0) map[j][y] = 1;
	//	}
	//	for (int j = x + 1; j <= h; j++) {
	//		if (map[j][y] == -1) break;
	//		if (map[j][y] == 0) map[j][y] = 1;
	//	}
	//}
	int flag = 0;
	for (int i = 1; i <= h; i++) {
		flag = 0;
		for (int j = 1; j <= w; j++) {
			if (map[i][j] == 2) {
				flag = 1; continue;
			}
			else if (map[i][j] == -1) flag = 0;
			if (flag) map[i][j] = 1;
		}
	}
	for (int i = 1; i <= h; i++) {
		flag = 0;
		for (int j = w; j > 0; j--) {
			if (map[i][j] == 2) {
				flag = 1; continue;
			}
			else if (map[i][j] == -1) flag = 0;
			if (flag) map[i][j] = 1;
		}
	}
	for (int j = 0; j <= w; j++) {
		flag = 0;
		for (int i = 0; i <= h; i++) {
			if (map[i][j] == 2) {
				flag = 1; continue;
			}
			else if (map[i][j] == -1) flag = 0;
			if (flag) map[i][j] = 1;
		}
	}
	for (int j = 0; j <= w; j++) {
		flag = 0;
		for (int i = h; i > 0; i--) {
			if (map[i][j] == 2) {
				flag = 1; continue;
			}
			else if (map[i][j] == -1) flag = 0;
			if (flag) map[i][j] = 1;
		}
	}
	for (int i = 1; i <= h; i++)
		for (int j = 1; j <= w; j++)
			if (map[i][j] > 0)
				ans++;
	cout << ans << endl;
	return 0;
}