#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip> // setprecision
#include <complex> // complex
#include <math.h>
#include <functional>
#include <cassert>
#define rep(i, a, n) for(int i = a; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const ll LINF = 1001002003004005006ll;
const int mod = 1000000007;
//const int mod = 998244353;

const int MX = 1505;
const int di[] = {-1, 0, 1, 0};
const int dj[] = {0, -1, 0, 1};

int h, w;
bool light[MX][MX];
bool wall[MX][MX];
bool ok[MX][MX];

bool visited[MX][MX];
bool memo[MX][MX];

bool f(int v, int i, int j){
    if(i < 0 || i >= h || j < 0 || j >= w) return false;
    if(wall[i][j]) return false;
    if(light[i][j]) return true;
    if(visited[i][j]) return memo[i][j];
    visited[i][j] = true;
    return memo[i][j] = f(v, i+di[v], j+dj[v]);
}

int main()
{
    int n, m;
    cin >> h >> w >> n >> m;
    rep(i, 0, n){
        int a, b;
        cin >> a >> b;
        a--; b--;
        light[a][b] = true;
    }
    rep(i, 0, m){
        int c, d;
        cin >> c >> d;
        c--; d--;
        wall[c][d] = true;
    }
    
    rep(v, 0, 4){
        rep(i, 0, h) rep(j, 0, w) visited[i][j] = false;
        rep(i, 0, h) rep(j, 0, w) if(f(v, i, j)) ok[i][j] = true;
    }
    
    int ans = 0;
    rep(i, 0, h) rep(j, 0, w) if(ok[i][j]) ans++;
    cout << ans << endl;
    return 0;
}

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename key>
using ordered_set = tree<key, null_type, less<key>, rb_tree_tag, tree_order_statistics_node_update>;
#define F first
#define S second
#define T second.first
#define C second.second
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);
#define all(v) v.begin(),v.end()
#define OO 0x3f3f3f3fLL
#define INF 0x3f3f3f3f3f3f3f3fLL
#define sz(s) (int)(s.size())
#define RT(s) return cout<<s,0
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef pair<ll,pair<ll,ll>> piii;
const int N = 1e5+5, M= 20, mod = 1e4+7, base = 15;
const double EPS = 1e-8;


int cnt[10000];

void solve(int n){
    int i;
    for(i=1; i*i<n; i++){
        if(n%i == 0){
            cnt[n/i]++;
            cnt[i]++;
        }
    }
    if(i*i == n)
        cnt[i]++;
}

int main(){
    FIO
//    freopen("calc.in", "r", stdin);
//    freopen("calc.out", "w", stdout);
    int n, m, l, b;
    int x,y;
    cin>>n>>m>>l>>b;
    int A[n][m], ans[n][m];
    memset(A, 0, sizeof A);
    memset(ans, 0, sizeof ans);
    for(int i=0; i<l; i++){
        cin>>x>>y;
        x--, y--;
        A[x][y] = 1;
    }
    for(int i=0; i<b; i++){
        cin>>x>>y;
        x--, y--;
        A[x][y] = 2;
    }

    for(int i=0; i<n; i++){
        bool f = 0;
        for(int j=0; j<m; j++){
            if(A[i][j] == 1){
                f = 1;
            }
            if(f && A[i][j]!=2)
                ans[i][j] = 1;

            if(A[i][j] == 2)
                f = 0;
        }
    }
    for(int i=0; i<n; i++){
        bool f = 0;
        for(int j=m-1; ~j; j--){
            if(A[i][j] == 1){
                f = 1;
            }
            if(f && A[i][j]!=2)
                ans[i][j] = 1;

            if(A[i][j] == 2)
                f = 0;
        }
    }
    for(int j=0; j<m; j++){
        bool f = 0;
        for(int i=0; i<n; i++){
            if(A[i][j] == 1){
                f = 1;
            }
            if(f && A[i][j]!=2)
                ans[i][j] = 1;

            if(A[i][j] == 2)
                f = 0;
        }
    }
    for(int j=0; j<m; j++){
        bool f = 0;
        for(int i=n-1; ~i; i--){
            if(A[i][j] == 1){
                f = 1;
            }
            if(f && A[i][j]!=2)
                ans[i][j] = 1;

            if(A[i][j] == 2)
                f = 0;
        }
    }
    int cnt = 0;
    for(int i=0; i<n; i++)
        for(int j=0; j<m; j++)
            cnt += ans[i][j];
    cout<<cnt;
}
