#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<ctime>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<bitset>
#define sqr(x) ((x)*(x))
#define fz1(i,n) for ((i)=1;(i)<=(n);(i)++)
#define fd1(i,n) for ((i)=(n);(i)>=1;(i)--)
#define fz0g(i,n) for ((i)=0;(i)<=(n);(i)++)
#define fd0g(i,n) for ((i)=(n);(i)>=0;(i)--)
#define fz0k(i,n) for ((i)=0;(i)<(n);(i)++)
#define fd0k(i,n) for ((i)=(long long)((n)-1);(i)>=0;(i)--)
#define fz(i,x,y) for ((i)=(x);(i)<=(y);(i)++)
#define fd(i,y,x) for ((i)=(y);(i)>=(x);(i)--)
#define fzin fz1(i,n)
#define fzim fz1(i,m)
#define fzjn fz1(j,n)
#define fzjm fz1(j,m)
#define ff(c,itr) for (__typeof((c).begin()) itr=(c).begin();itr!=(c).end();++itr)
#define rdst(st,len){static char ss[len];scanf(" %s",ss);(st)=ss;}
#define inc(x,y) {x+=(y);if(x>=mod)x-=mod;}
#define dec(x,y) {x-=(y);if(x<0)x+=mod;}
#define spln(i,n) (i==n?'\n':' ')
#define fac_init(n){fac[0]=fac[1]=inv[1]=fi[0]=fi[1]=1;fz(i,2,n){fac[i]=1ll*fac[i-1]*i%mod;inv[i]=1ll*(mod-mod/i)*inv[mod%i]%mod;fi[i]=1ll*fi[i-1]*inv[i]%mod;}}
using namespace std;
inline void read(int &x)
{
	char c;int f=1;
	while(!isdigit(c=getchar()))if(c=='-')f=-1;
	x=(c&15);while(isdigit(c=getchar()))x=(x<<1)+(x<<3)+(c&15);
	x*=f;
}
const int dx[4]={0,0,-1,1},dy[4]={-1,1,0,0};
const int mod=1e9+7;
int n,m,k,i,j,su[1000005],sd[1000005],sl[1000005],sr[1000005],ans,px[35],py[35],d[65][65],a[65][65],idx[1000005],idy[1000005],szx[65],szy[65],lx,ly,lst;
vector<int> allx,ally;
int calc(int sx,int sy)
{
	int ans=0,i,j;
	memset(d,0x3f,sizeof(d));
	d[sx][sy]=0;
	queue<int> qx,qy;
	qx.push(sx);qy.push(sy);
	while(!qx.empty()){
		int x=qx.front(),y=qy.front();qx.pop();qy.pop();
		fz0k(i,4){
			int xx=x+dx[i],yy=y+dy[i];
			if(1<=xx&&xx<=lx&&1<=yy&&yy<=ly&&!a[xx][yy]){
				if(d[xx][yy]>d[x][y]+1){
					d[xx][yy]=d[x][y]+1;
					qx.push(xx);qy.push(yy);
				}
			}
		}
	}
	fz1(i,lx)fz1(j,ly)if((i>sx||(i==sx&&j>sy))&&!a[i][j]){
		ans=(ans+1ll*szx[i]*szy[j]%mod*d[i][j])%mod;
	}
	return ans;
}
int main()
{
	read(n);read(m);read(k);
	fz1(i,k){
		read(px[i]);read(py[i]);
		px[i]++;py[i]++;
		su[px[i]]--;sd[px[i]]--;
		sl[py[i]]--;sr[py[i]]--;
		allx.push_back(px[i]);
		ally.push_back(py[i]);
	}
	fz1(i,n){
		(su[i]+=su[i-1]+m)%=mod;
	}
	fd1(i,n){
		(sd[i]+=sd[i+1]+m)%=mod;
	}
	fz1(i,m){
		(sl[i]+=sl[i-1]+n)%=mod;
	}
	fd1(i,m){
		(sr[i]+=sr[i+1]+n)%=mod;
	}
	sort(allx.begin(),allx.end());
	allx.resize(unique(allx.begin(),allx.end())-allx.begin());
	sort(ally.begin(),ally.end());
	ally.resize(unique(ally.begin(),ally.end())-ally.begin());
	lst=0;
	for(i=0;i<allx.size();i++){
		if(allx[i]-1>lst){
			szx[++lx]=allx[i]-1-lst;
			for(j=lst+1;j<allx[i]-1;j++){
				ans=(ans+1ll*su[j]*sd[j+1])%mod;
			}
		}
		lst=allx[i];
		szx[++lx]=1;idx[allx[i]]=lx;
	}
	if(lst<n){
		szx[++lx]=n-lst;
		for(j=lst+1;j<n;j++){
			ans=(ans+1ll*su[j]*sd[j+1])%mod;
		}
	}
	lst=0;
	for(i=0;i<ally.size();i++){
		if(ally[i]-1>lst){
			szy[++ly]=ally[i]-1-lst;
			for(j=lst+1;j<ally[i]-1;j++){
				ans=(ans+1ll*sl[j]*sr[j+1])%mod;
			}
		}
		lst=ally[i];
		szy[++ly]=1;idy[ally[i]]=ly;
	}
	if(lst<m){
		szy[++ly]=m-lst;
		for(j=lst+1;j<m;j++){
			ans=(ans+1ll*sl[j]*sr[j+1])%mod;
		}
	}
	fz1(i,k){
		a[idx[px[i]]][idy[py[i]]]=1;
	}
	fz1(i,lx){
		fz1(j,ly)if(!a[i][j]){
			ans=(ans+1ll*szx[i]*szy[j]%mod*calc(i,j))%mod;
		}
	}
	printf("%d\n",ans);
	return 0;
}

Measured memory_bytes: 19628