#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define endl "\n"
#define F first
#define S second
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define debug(a) cout << #a << " = " << a << " ";

template<typename T> istream &operator>>(istream &is, vector<T> &vec) { for (auto &v : vec) is >> v; return is; }
template<typename T> using min_heap = priority_queue<T, vector<T>, greater<T>>;

const int  MOD=1000000007;
const int N=100005;

int n,m;
int a[1505][1505];
bool vis[1505][1505][4];
map< pair<int,int> , int > mp;

void Run(int x,int y,int dx,int dy) {
    if (x <= 0 || y <= 0 || x > n || y > m)
        return;
    if (a[x][y] == -1)
        return;
    if (vis[x][y][mp[{dx, dy}]])
        return;
    vis[x][y][mp[{dx, dy}]] = true;
    Run(x + dx, y + dy, dx, dy);
}

void solve() {
    cin >> n >> m;
    memset(a, 0, sizeof(a));
    memset(vis, false, sizeof(vis));
    long bulb, block;
    cin >> bulb >> block;
    while (bulb--) {
        long x, y;
        cin >> x >> y;
        a[x][y] = 1;
    }
    while (block--) {
        long x, y;
        cin >> x >> y;
        a[x][y] = -1;
    }
    mp[{-1, 0}] = 0;
    mp[{1, 0}] = 1;
    mp[{0, -1}] = 2;
    mp[{0, 1}] = 3;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= m; j++) {
            if (a[i][j] == 1) {
                Run(i, j, -1, 0);
                Run(i, j, 1, 0);
                Run(i, j, 0, -1);
                Run(i, j, 0, 1);
            }
        }
    }
    int Ans = 0;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= m; j++)
            Ans += (vis[i][j][0] || vis[i][j][1] || vis[i][j][2] || vis[i][j][3]) * 1;
    }
    cout << Ans << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long int t=1;
    // cin>>t;                     // DON'T FORGET IT. ^^^
    for(long int tt=1;tt<=t;tt++){
        solve();
    }
    cerr << "Time : " << 1000 * ((double) clock()) / (double) CLOCKS_PER_SEC << "ms\n";
    return 0;
}
#include <iostream>
#include <vector>
//#include <string>
//#include <algorithm>
//#include <math.h>
//#include <queue>
//#include <stack>
//#include <iomanip>

// sometimes used
//#include <set>
//#include <map>
//#include <numeric>
//#include <list>
//#include <deque>
//#include <unordered_map>

typedef long long LL;
//typedef long double LD;
using namespace std;
 
//#define MOD 1000000007
//#define MOD 998244353
//#define MAX 100100
#define NIL -1
//#define INFTY 1000000000000000000

int main(){
    LL h;
    LL w;
    LL n;
    LL m;
    cin >> h >> w >> n >> m;
    vector<vector<LL>> brk(h, vector<LL>(w, 0));
    vector<vector<bool>> x_sft(h, vector<bool>(w, false));
    vector<vector<bool>> y_sft(h, vector<bool>(w, false));     
    LL a;
    LL b;
    for(LL i=0; i<n; i++){
        cin >> a >> b;
        a--;
        b--;
        brk[a][b]=1;
        x_sft[a][b]=true;
        y_sft[a][b]=true;
    }
    for(LL i=0; i<m; i++){
        cin >> a >> b;
        a--;
        b--;
        brk[a][b]=NIL;
    }

    for(LL i=0; i<h; i++){
        for(LL j=1; j<w; j++){
            if(x_sft[i][j-1]==true && brk[i][j]!=NIL){
                x_sft[i][j]=true;
            }
        }
        for(LL j=w-2; j>=0; j--){
            if(x_sft[i][j+1]==true && brk[i][j]!=NIL){
                x_sft[i][j]=true;
            }
        }
    }

    for(LL i=0; i<w; i++){
        for(LL j=1; j<h; j++){
            if(y_sft[j-1][i]==true && brk[j][i]!=NIL){
                y_sft[j][i]=true;
            }
        }
        for(LL j=h-2; j>=0; j--){
            if(y_sft[j+1][i]==true && brk[j][i]!=NIL){
                y_sft[j][i]=true;
            }
        }
    }

    /*
    for(LL i=0; i<h; i++){
        for(LL j=0; j<w; j++){
            if(x_sft[i][j]==true){
                cout << 1;
            }else{
                cout << 0;
            }
        }
        cout << endl;
    }

    for(LL i=0; i<h; i++){
        for(LL j=0; j<w; j++){
            if(y_sft[i][j]==true){
                cout << 1;
            }else{
                cout << 0;
            }
        }
        cout << endl;
    }
    */
    LL ans=0;
    for(LL i=0; i<h; i++){
        for(LL j=0; j<w; j++){
            if(x_sft[i][j]==true || y_sft[i][j]==true){
                ans++;
            }
        }
    }

    cout << ans << endl;

    return 0;
}
