You are given an H \times W grid. The square at the top-left corner will be represented by (0, 0), and the square at the bottom-right corner will be represented by (H-1, W-1).

Of those squares, N squares (x_1, y_1), (x_2, y_2), ..., (x_N, y_N) are painted black, and the other squares are painted white.

Let the shortest distance between white squares A and B be the minimum number of moves required to reach B from A visiting only white squares, where one can travel to an adjacent square sharing a side (up, down, left or right) in one move.

Since there are H × W - N white squares in total, there are _{(H×W-N)}C_2 ways to choose two of the white squares.

For each of these _{(H×W-N)}C_2 ways, find the shortest distance between the chosen squares, then find the sum of all those distances, modulo 1 000 000 007=10^9+7.

Constraints

* 1 \leq H, W \leq 10^6
* 1 \leq N \leq 30
* 0 \leq x_i \leq H-1
* 0 \leq y_i \leq W-1
* If i \neq j, then either x_i \neq x_j or y_i \neq y_j.
* There is at least one white square.
* For every pair of white squares A and B, it is possible to reach B from A visiting only white squares.

Input

Input is given from Standard Input in the following format:


H W
N
x_1 y_1
x_2 y_2
:
x_N y_N


Output

Print the sum of the shortest distances, modulo 10^9+7.

Examples

Input

2 3
1
1 1


Output

20


Input

2 3
1
1 2


Output

16


Input

3 3
1
1 1


Output

64


Input

4 4
4
0 1
1 1
2 1
2 2


Output

268


Input

1000000 1000000
1
0 0


Output

333211937
// SUBLIME HAX
	/*nope
	cat
	// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars// sixteen chars
	// ayy
	// ' lamo
	*/
	#include <bits/stdc++.h>
	using namespace std;
	template<class T,class U>
	ostream &operator<<(ostream &os,const pair<T,U> &x) {
		return os<<"("<<x.first<<","<<x.second<<")";
	}
	namespace dbg_ns {
		template<typename C>
		struct is_iterable {
			template<class T> static long check(...);
			template<class T> static char check(int,
				typename T::const_iterator = C().end());
			enum {
				value = sizeof(check<C>(0)) == sizeof(char),
				neg_value = sizeof(check<C>(0)) != sizeof(char)
			};
		};
		template<class T> ostream &_out_str(ostream &os,const T &x) {
			return os<<'"'<<x<<'"';
		}
		template<class T> ostream &_dbg2_5(ostream &,const T &);
		template<bool B,typename T=void> using eit=typename enable_if<B,T>::type;
		template<class T>
		inline ostream &_dbg3(ostream &os,eit<is_iterable<T>::neg_value,const T> &x) {
			return os<<x;
		}
		template<class T>
		inline ostream &_dbg3(ostream &os,eit<is_iterable<T>::value,const T> &V) {
			os<<"{";
			bool ff=0;
			for(const auto &E:V) _dbg2_5(ff?os<<",":os,E), ff=1;
			return os<<"}";
		}
		template<>
		inline ostream &_dbg3<string>(ostream &os,const string &x) {
			return _out_str(os,x);
		}
		template<>
		inline ostream &_dbg3<const char *>(ostream &os,const char *const &x) {
			return _out_str(os,x);
		}
		template<class T> inline ostream &_dbg2_5(ostream &os,const T &x) {
			return _dbg3<T>(os,x);
		}
		template<class T,typename... Args> ostream &_dbg2(ostream &os,vector<string>::iterator nm,const T &x,Args&&... args);
		inline ostream &_dbg2(ostream &os,vector<string>::iterator) { return os; }
		template<typename... Args>
		inline ostream &_dbg2(ostream &os,vector<string>::iterator nm,const char *x,Args&&... args) {
			return _dbg2(_dbg3<const char *>(os<<"  ",x),nm+1,args...);
		}
		template<class T,typename... Args>
		inline ostream &_dbg2(ostream &os,vector<string>::iterator nm,const T &x,Args&&... args) {
			return _dbg2(_dbg3<T>(os<<"  "<<*nm<<"=",x),nm+1,args...);
		}
		vector<string> split(string s) {
			vector<string> Z;
			string z="";
			s+=',';
			int dep=0;
			for(char c:s) {
				if(c==',' && !dep) Z.push_back(z),z="";
				else z+=c;
				if(c=='(') ++dep;
				if(c==')') --dep;
			}
			return Z;
		}
		template<typename... Args> inline ostream &_dbg1(int ln,const string &nm,Args&&... args) {
			auto nms=split(nm);
			return _dbg2(cerr<<"L"<<ln<<":",nms.begin(),args...)<<endl;
		}
	}
	#define dbg(...) dbg_ns::_dbg1(__LINE__,#__VA_ARGS__,__VA_ARGS__)
	#define sz(x) (int(x.size()))
	#define eprintf(...) fprintf(stderr,__VA_ARGS__)
	#define fi first
	#define se second
	#define pb push_back
// END SUBLIME HAX
// #include <bits/extc++.h>
// using namespace __gnu_pbds;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld; //CARE
typedef complex<ld> pt;
const ld eps=(ld)1e-8;
const ld tau=2*(ld)acosl(-1);
const int inf=1e9+99;
const ll linf=1e18+99;
const int P=1e9+7;


// #define int __int128
// #define ll __int128

int32_t H,W;
int32_t n;

const int32_t N=8192;
const int NN=8074;
int D1[NN/2][NN/2];
int D2[NN/2][NN];
inline int &D(int x,int y) {
	if(x<y) swap(x,y);
	if(x+x<NN) return D1[x][y];
	return D2[x-(NN>>1)][y];
}
vector<pair<int,int> > adj[N];
vector<pair<int,int> > rels;
vector<int> relx,rely;
set<pair<int,int> > bads;
set<int> bx,by;
vector<pair<int,int> > bandx,bandy;

map<int,int> ddec[1<<20];

int dec(int x,int y) {
	return ddec[x].count(y) ? ddec[x][y] : -1;
	auto it=lower_bound(rels.begin(),rels.end(),pair<int,int>(x,y));
	if(it!=rels.end() && it->fi==x && it->se==y)
		return int(it-rels.begin());
	return -1;
}


int sL(int x) { // 0+..+x-1
	return int(1LL*x*(x-1)/2%P);
}
int ww(int x) {
	static bool init=0;
	static int Z[1<<20];
	assert(1<=x && x<(1<<20));
	if(!init) {
		init=1;
		assert(!sL(0) && !sL(1));
		for(int i=1;i<(1<<20);i++) {
			Z[i]=sL(i)+Z[i-1];
			if(Z[i]>=P) Z[i]-=P;
		}
	}
	return Z[x];
}
int qq(int x,int y) {
	return int((1LL*x*sL(y)+1LL*y*sL(x))%P);
}
inline int _w(const pair<int,int> &P) {
	if(~P.se) return P.se-P.fi+1;
	return 1;
}
int g_same(int w,int h) {
	// dbg("SS",w,h);
	// dbg(ww(h));
	return int((1LL*w*w%P*ww(h) + 1LL*h*h%P*ww(w))%P);
}
int g_same(int w,const pair<int,int> &X,const pair<int,int> &_X) {
	if(X==_X) return g_same(w,_w(X));
	int d0;
	int a= X.fi,b=~ X.se? X.se: X.fi;
	int c=_X.fi,d=~_X.se?_X.se:_X.fi;
	assert(a<=b && c<=d);
	if(b<c) d0=c-b; else
	if(d<a) d0=a-d; else
	assert(0);
	int h1=_w(X);
	int h2=_w(_X);

	ll ZZ=d0;
	ZZ=ZZ*w%P*h1%P*w%P*h2%P;
	ZZ+=1LL*h1*h2%P*ww(w)*2; //dbg(h1,h2,w,ww(w));
	ZZ+=1LL*w*w%P*qq(h1,h2);
	// dbg("HIT",w,h1,h2,ZZ,d0);
	return int(ZZ%P);
}
inline int close(const pair<int,int> &X,int x) {
	if(!~X.se) return X.fi;
	if(x<X.fi) return X.fi;
	if(x>X.se) return X.se;
	assert(0);
}
int g(const pair<int,int> &X,const pair<int,int> &Y,
	const pair<int,int> &_X,const pair<int,int> &_Y) {

	if(X==_X && Y==_Y && !~X.se && !~Y.se) return 0;

	if(X==_X && ~X.se) return g_same(_w(X),Y,_Y);
	if(Y==_Y && ~Y.se) return g_same(_w(Y),X,_X);

	int  Cx=_w(X);
	int  Cy=_w(Y);
	int _Cx=_w(_X);
	int _Cy=_w(_Y);
	int CCx=int(1LL*Cx*_Cx%P);
	int CCy=int(1LL*Cy*_Cy%P);

	int u=dec(close(X,_X.fi),close(Y,_Y.fi)); assert(~u);
	int v=dec(close(_X,X.fi),close(_Y,Y.fi)); assert(~v);

	ll ZZ=D(u,v); assert(ZZ<inf);

	ZZ=ZZ*CCx%P*CCy;
	// dbg(C,_C,ZZ,ZZ%P);

	ZZ+=1LL*CCx*qq(Cy,_Cy);
	ZZ+=1LL*CCy*qq(Cx,_Cx);

	// dbg(ZZ,ZZ%P);

	return int(ZZ%P);
}


template<class T> struct PQ {
	int n=0;
	T A[N*4];
	void push(const T &x) {
		int i=++n;
		A[i]=x;
		for(;i>1 && A[i>>1]<A[i];) swap(A[i>>1],A[i]), i>>=1;
	}
	T top() const { return A[1]; }
	void pop() {
		assert(n>=1);
		if(n>1) swap(A[1],A[n]);
		n--;
		int i=1;
		for(;;) {
			int j=i<<1;
			if(j>n) break;
			if(j==n) {
				if(A[j]>A[i]) swap(A[j],A[i]);
				break;
			}
			if(A[j+1]>A[j]) ++j;
			if(A[j]>A[i]) swap(A[j],A[i]);
			else break;
			i=j;
		}
	}
	int size() const {
		return n;
	}
};
// PQ<pair<int,int> > pq;
// priority_queue<pair<int,int> > pq;
// queue<pair<int,int> > pq;
int pq[N];
bool inq[N];
#define top front

void dijk(int src,int *DD) {
	// for(int u=0;u<n;u++) DD[u]=inf;
	// for(int u=0;u<=src;u++) DD[u]=D[u][src], pq.push({-DD[u],u});
	// for(int u=src+1;u<n;u++) DD[u]=inf;
	// if(src) for(int u=src+1;u<n;u++) DD[u]=D[src-1][u]+DD[src-1], pq.push({-DD[u],u});
	int pn=0;
	for(int u=0;u<=src;u++) DD[u]=D(u,src), pq[pn++]=u;
	for(int u=src+1;u<n;u++) DD[u]=inf;
	if(src) for(int u=src+1;u<n;u++) DD[u]=D(src-1,u)+DD[src-1], pq[pn++]=u;

	int ii=0;
	for(int i=0;i<n;i++) inq[i]=0;
	for(int i=0;i<pn;i++) inq[pq[i]]=1;
	// DD[src]=0;
	// pq.push({0,src});
	// for(;sz(pq);) {
	for(;ii<pn;) {
		// auto P=pq.top();
		// int u=P.se;
		// int d=-P.fi;
		// pq.pop();
		// if(DD[u]<d) continue;
		int u=pq[(ii++)&(N-1)];
		inq[u]=0;
		int d=DD[u];
		for(const auto &P:adj[u]) if(d+P.se<DD[P.fi]) {
			DD[P.fi]=d+P.se;
			// pq.push({-DD[P.fi],P.fi});
			if(!inq[P.fi]) pq[(pn++)&(N-1)]=P.fi;
		}
	}
}


int32_t main() {
	// for(int i=1;i<6;i++) dbg(i,ww(i));
	cin>>H>>W>>n;
	for(int i=0;i<n;i++) {
		int32_t x,y; cin>>x>>y;
		bads.insert({x,y});
		bx.insert(x), by.insert(y);
	}
	for(int _x:bx) for(int x=_x-1;x<=_x+1;x++)
		if(!sz(relx) || x>relx.back()) if(0<=x && x<H)
			relx.pb(x);
	for(int _y:by) for(int y=_y-1;y<=_y+1;y++)
		if(!sz(rely) || y>rely.back()) if(0<=y && y<W)
			rely.pb(y);

	for(int x:relx) for(int y:rely) if(!bads.count({x,y})) rels.pb({x,y});
	sort(rels.begin(),rels.end());
	n=sz(rels);
	assert(n<=NN);
	for(int i=0;i<n;i++) ddec[rels[i].fi][rels[i].se]=i;

	for(int i=1;i<sz(relx);i++) for(int y:rely) {
		int u=dec(relx[i-1],y);
		int v=dec(relx[i],y);
		int d=relx[i]-relx[i-1];
		if(~u && ~v) {
			adj[u].pb({v,d});
			adj[v].pb({u,d});
		}
	}
	for(int i=1;i<sz(rely);i++) for(int x:relx) {
		int u=dec(x,rely[i-1]);
		int v=dec(x,rely[i]);
		int d=rely[i]-rely[i-1];
		if(~u && ~v) {
			adj[u].pb({v,d});
			adj[v].pb({u,d});
		}
	}

	static int DD[N];
	for(int i=0;i<n;i++) {
		dijk(i,DD);
		for(int j=0;j<n;j++) D(i,j)=DD[j];
	}
	// for(int i=0;i<n;i++) for(int j=0;j<n;j++) dbg(rels[i],rels[j],D[i][j]);

	{
		int pr=-1;
		for(int x:bx) {
			if(x-1>pr) bandx.pb({pr+1,x-1});
			bandx.pb({x,-1});
			pr=x;
		}
		if(H-1>pr) bandx.pb({pr+1,H-1});
	}
	{
		int pr=-1;
		for(int y:by) {
			if(y-1>pr) bandy.pb({pr+1,y-1});
			bandy.pb({y,-1});
			pr=y;
		}
		if(W-1>pr) bandy.pb({pr+1,W-1});
	}

	assert(sz(bandx)<=61 && sz(bandy)<=61);

	ll Z=0;
	for(const auto &BX:bandx) for(const auto &BY:bandy) {
		if(bads.count({BX.fi,BY.fi})) continue;
		for(const auto &_BX:bandx) for(const auto &_BY:bandy) {
			if(BX>_BX) continue;
			if(BX==_BX && BY>_BY) continue;
			if(!~_BX.se && !~_BY.se && bads.count({_BX.fi,_BY.fi})) continue;
			int w=g(BX,BY,_BX,_BY);
			Z+=w;
		}
	}
	cout<<int32_t(Z%P)<<endl;
}











