#include<bits/stdc++.h>
#include<math.h>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<vector>
#include<string>
#define MAXN 100005
#define Endl '\n'
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define up  upper_bound
#define ll long long int
#define pii pair<ll,ll>
#define all(v) v.begin(),v.end()
#define fi(x,n) for(ll i=x;i<n;i++)
#define fj(x,n) for(ll j=x;j<n;j++)
#define fk(x,n) for(ll k=x;k<n;k++)
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize("Ofast","no-stack-protector")
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll exp(ll x,ll y,ll mod)
{
	ll res=1;
	x=x%mod;
	while(y>0)
	{
		if(y&1)
			res=(res*x)%mod;
		y = y>>1;
		x=(x*x)%mod;
	}
	return res;
}
ll modinverse(ll x,ll mod)
{
    return exp(x,mod-2,mod);
}
using namespace std;
const ll inf = 0x3f3f3f3f3f3f3f3fll;
void solve()
{
    ll h,w,n,m;
    cin>>h>>w>>n>>m;
    ll v1[h][w],v2[h][w];
    fi(0,h)
    {
        fj(0,w)
        {
            v1[i][j]=0;
            v2[i][j]=0;
        }
    }

    fi(0,n)
    {
        ll x,y;
        cin>>x>>y;
        x--;
        y--;
        v1[x][y]=1;
        v2[x][y]=1;
    }

    fi(0,m)
    {
        ll x,y;
        cin>>x>>y;
        x--;
        y--;
        v1[x][y]=2;
        v2[x][y]=2;
    }

    fi(0,h)
    {
        ll j=0,x=0;
        while(j<w)
        {
            if(v1[i][j]==2)
                x=0;
            else if(v1[i][j]==1)
                x=1;
            else
                v1[i][j]=x;

            j++;
        }

        j=w-1;
        x=0;
        while(j>=0)
        {
            if(v1[i][j]==2)
                x=0;
            else if(v1[i][j])
                x=1;
            else
                v1[i][j]=x;

            j--;
        }
    }

    fi(0,w)
    {
        ll j=0,x=0;
        while(j<h)
        {
            if(v2[j][i]==2)
                x=0;
            else if(v2[j][i]==1)
                x=1;
            else
                v2[j][i]=x;

            j++;
        }

        j=h-1;
        x=0;
        while(j>=0)
        {
            if(v2[j][i]==2)
                x=0;
            else if(v2[j][i]==1)
                x=1;
            else
                v2[j][i]=x;

            j--;
        }
    }

    ll res=0;
    fi(0,h)
    {
        fj(0,w)
        {
            if(v1[i][j]==1)
                res++;
            if(v2[i][j]==1)
                res++;

            if(v1[i][j]==1&&v2[i][j]==1)
                res--;
        }
    }
    cout<<res;

}
int main()
{
    fastio;
    //freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
    ll t;
    t=1;
    while(t--)
        solve();

    return 0;
}

#include <bits/stdc++.h>
#define ft first
#define sc second
#define pt(sth) cout << sth << "\n"
#define moca(a, s, b) a=((a)s(b)+MOD)%MOD
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
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;}
static const ll INF=1e18;
static const ll MAX=101010;
static const ll MOD=1e9+7;


//for(i=0; i<N; i++) cin >> a[i];

ll H, W, N, M;
ll s[1555][1555];
ll l[1555][1555];
ll r[1555][1555];
ll u[1555][1555];
ll d[1555][1555];

int main(void) {
  ll i, j, k;
  
  cin >> H >> W >> N >> M;
  for(i=0; i<N; i++) {
    ll a, b;
    cin >> a >> b;
    s[a][b]=1;
  }
  
  for(i=0; i<M; i++) {
    ll c, d;
    cin >> c >> d;
    s[c][d]=2;
  }
  
  
  
  for(i=1; i<=H; i++) {
    for(j=1; j<=W; j++) {
      if(s[i][j]) l[i][j]=s[i][j];
      else l[i][j]=l[i][j-1];
    }
  }
  
  for(i=1; i<=H; i++) {
    for(j=W; j>=1; j--) {
      if(s[i][j]) r[i][j]=s[i][j];
      else r[i][j]=r[i][j+1];
    }
  }
  
  for(j=1; j<=W; j++) {
    for(i=1; i<=H; i++) {
      if(s[i][j]) u[i][j]=s[i][j];
      else u[i][j]=u[i-1][j];
    }
  }
  
  for(j=1; j<=W; j++) {
    for(i=H; i>=1; i--) {
      if(s[i][j]) d[i][j]=s[i][j];
      else d[i][j]=d[i+1][j];
    }
  }
  
  ll ans=0;
  for(i=1; i<=H; i++) {
    for(j=1; j<=W; j++) {
      ans+=(l[i][j]==1 || r[i][j]==1 || u[i][j]==1 || d[i][j]==1);
    }
  }
  
  pt(ans);
  
}

