#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<int,int> pi;
//bool vis[1000];
int x[]={1,-1,0,0};
int y[]={0,0,1,-1};
//int f=0;
//int t[500000];
//int ll[500000];
//"'';

int main(){
int r,c,n,m;
cin>>r>>c>>n>>m;
int dp[r][c][4];
memset(dp,0,sizeof(dp));
vector<vector<int> > v(r,vector<int>(c,0));
queue<vector<int> > q;
int ans=0;
for(int i=0;i<n;i++){
    int a,b;
    cin>>a>>b;
    a--;
    b--;
    v[a][b]=1;
    for(int j=0;j<4;j++){
        q.push({a,b,j});
        dp[a][b][j]=1;
    }
}
for(int i=0;i<m;i++){
    int a,b;
    cin>>a>>b;
    a--;
    b--;
    v[a][b]=-1;
}
while(!q.empty()){
    vector<int> u=q.front();
    q.pop();
    int na=u[0]+x[u[2]];
    int nb=u[1]+y[u[2]];
    int nd=u[2];
    if(na<r&&na>=0&&nb<c&&nb>=0&&dp[na][nb][nd]==0&&v[na][nb]!=-1){
        dp[na][nb][nd]=1;
        q.push({na,nb,nd});
    }
}
for(int i=0;i<r;i++){
    for(int j=0;j<c;j++){
        int f=0;
        for(int k=0;k<4;k++){
            f=max(f,dp[i][j][k]);
        }
        ans+=f;
    }
}
cout<<ans<<endl;
}

#include<bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i = k ;i<=n;i++)
#define FOR(i,n,k) for(int i = n;i>=k;i--)
#define ll long long
#define si(x)   scanf("%d",&x)
#define sl(x)   scanf("%lld",&x)
#define ss(s)   scanf("%s",s)
#define pi(x)   printf("%d\n",x)
#define pl(x)   printf("%lld\n",x)
#define ps(s)   printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define mems(a,x) memset(a,x,sizeof(a))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>  pii;
typedef pair<ll, ll>    pl;
typedef vector<int>     vi;
typedef vector<ll>      vl;
typedef vector<pii>     vpii;
typedef vector<pl>      vpl;
typedef vector<vi>      vvi;
typedef vector<vl>      vvl;
mt19937_64 rang(chrono::high_resolution_clock::now().time_since_epoch().count());
int rng(int lim) {
    uniform_int_distribution<int> uid(0, lim - 1);
    return uid(rang);
}
const int mod = 1000000007;
const int N = 3e5, M = N;

//vi g[N];
//int a[N];

void solve()
{
    int h, w, n, m, i, j;
    cin >> h >> w >> n >> m;

    int a[h][w] = {0};
    int dp[h][w] = {0};

    clr(a);
    clr(dp);

    fo(i, n)
    {
        int x, y;
        cin >> x >> y;
        x--; y--;
        a[x][y] = 1;
    }
    fo(i, m)
    {
        int x, y;
        cin >> x >> y;
        x--; y--;
        a[x][y] = -1;

    }



    fo(i, h)
    {
        fo(j, w)
        {
            if (j != 0 && (a[i][j - 1] == 1 || a[i][j - 1] == 2) && a[i][j] == 0)
            {    a[i][j] = 2;}
        }
        FOR(j, w - 2, 0)
        {
            if ((a[i][j + 1] == 1 || a[i][j + 1] == 2) && a[i][j] == 0)
            {a[i][j] = 2;}
        }
    }

    /* fo(i, h)
     {
         fo(j, w)
         cout << a[i][j] << " ";
         cout << endl;
     }*/
    fo(i, w)
    {
        fo(j, h)
        {
            if (j != 0 && (a[j - 1][i] == 1 || a[j - 1][i] == 3) && (a[j][i] == 0 || a[j][i] == 2))
            {
                //cout << j << " " << i << endl;
                a[j][i] = 3;
            }
        }
        FOR(j, h - 2, 0)
        {
            if ((a[j + 1][i] == 1 || a[j + 1][i] == 3) && (a[j][i] == 0 || a[j][i] == 2))
            {   //cout << j << " " << i << endl;
                a[j][i] = 3;
            }
        }
    }

    int ans = 0;
    fo(i, h)
    {
        fo(j, w)
        {
            //cout << a[i][j] << " ";
            ans += (a[i][j] == 1 || a[i][j] == 2 || a[i][j] == 3);
        }
        //cout << endl;
    }
    cout << ans << endl;

}

int main() {
    //ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());

    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }

    return 0;
}




