#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<unordered_set>
#define Min(a,b) a=min(a,b);
#define lol(i,n) for(ll i=0;i<n;i++)
#define mod 1000000007
typedef long long ll;

using namespace std;
#define H 4010
#define N (1<<12)
class RSQ{
private:
    ll dat[N*2];
    ll dfs(int l,int r,int a,int b,int k){
	if(l<=a&&b<=r)return dat[k];
	if(b<=l||r<=a)return 0;
	int vl=dfs(l,r,a,(a+b)/2,k*2+1);
	int vr=dfs(l,r,(a+b)/2,b,k*2+2);
	return vl+vr;
    }
public:
    void Init(){
	lol(i,2*N)dat[i]=0;
    }
    void Update(int i,int x){
	i+=N-1;
	dat[i]=x;
	while(i>0){
	    i=(i-1)/2;
	    dat[i]=dat[i*2+1]+dat[i*2+2];
	}
    }
    ll Sum(int l,int r){
	if(r>N-2)r=N-2;
	if(l>r)return 0;
	return dfs(l,r+1,0,N,0);
    }
};
ll h,w,p,q;
//bool t[H][H];
unordered_set<int> st[H];
ll f[H][H],g[H][H];
int main(){
    cin>>h>>w>>q>>p;
    lol(i,h)lol(j,w)f[i][j]=g[i][j]=mod;
    lol(i,p){int y,x;cin>>y>>x;st[y-1].insert(x-1);}
    lol(i,h){
	ll cnt=-1;
	lol(j,w){
	    if(st[i].find(j)!=st[i].end())cnt=-1;
	    else cnt++;
	    Min(g[i][j],cnt);
	}
	cnt=-1;
	for(int j=w-1;j>=0;j--){
	    if(st[i].find(j)!=st[i].end())cnt=-1;
	    else cnt++;
	    Min(f[i][j],cnt);
	}
    }
    lol(j,w){
	ll cnt=-1;
	lol(i,h){
	    if(st[i].find(j)!=st[i].end())cnt=-1;
	    else cnt++;
	    Min(f[i][j],cnt);
	}
	cnt=-1;
	for(int i=h-1;i>=0;i--){
	    if(st[i].find(j)!=st[i].end())cnt=-1;
	    else cnt++;
	    Min(g[i][j],cnt);
	}
    }
    ll ans=0;
    lol(r,h+w-1){
	int sy,sx;
	if(r<h)sy=r,sx=0;
	else sy=h-1,sx=r-h+1;
	ll n=min(min(r+1,h+w-1-r),min(h,w));
	vector<pair<ll,ll> >v;
	lol(i,n){
	    int y=sy-i,x=sx+i;
	    if(g[y][x]==-1)continue;
	    v.push_back(make_pair(i-g[y][x],i));
	}
	sort(v.begin(),v.end());
	int last=0;
	RSQ seg;seg.Init();
	lol(i,n){
	    int y=sy-i,x=sx+i;
	    if(f[y][x]==-1)continue;
	    while(last<v.size()){
		if(v[last].first<=i){
		    seg.Update(v[last].second,1);
		    last++;
		}
		else break;
	    }
	    ans+=seg.Sum(i+q-1,i+f[y][x]);
	}
    }
    cout<<ans<<endl;
    return 0;
}

