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
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define REP(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, a, b) for(int i=(a); i<(b); ++i)
#define FORR(i, a, b) for(int i=(b)-1; i>=(a); --i)

#define DEBUG(x) cout<<#x<<": "<<x<<'\n'
#define DEBUG_VEC(v) cout<<#v<<":";REP(i, v.size())cout<<' '<<v[i];cout<<'\n'
#define ALL(a) (a).begin(), (a).end()

#define CHMIN(a, b) a=min((a), (b))
#define CHMAX(a, b) a=max((a), (b))

const ll MOD=1000000007ll;
// const ll MOD=998244353ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

const double EPS=1e-11;
#define EQ0(x) (abs((x))<EPS)
#define EQ(a, b) (abs((a)-(b))<EPS)

int h, w, n, x[40], y[40], xnum[1364364], ynum[1364364], H, W;
vi X, Y;
ll ans;
bool used[70][70];
int d[70][70], dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};

ll bfs(){
	ll res=0;
	REP(i, H){
		REP(j, W){
			if(used[i][j]){
				continue;
			}
			REP(k, H){
				REP(l, W){
					d[k][l]=-1;
				}
			}
			queue<pii> q;
			q.push(pii(i, j));
			d[i][j]=0;
			while(!q.empty()){
				pii p=q.front();
				q.pop();
				int sx=p.first, sy=p.second;
				REP(k, 4){
					int tx=sx+dx[k], ty=sy+dy[k];
					if(tx<0 || tx>=H || ty<0 || ty>=W || used[tx][ty] || d[tx][ty]!=-1){
						continue;
					}
					d[tx][ty]=d[sx][sy]+1;
					q.push(pii(tx, ty));
				}
			}
			REP(k, H){
				REP(l, W){
					if(used[k][l] || d[k][l]==-1){
						continue;
					}
					ll tmp1=((ll)X[i+1]-X[i])*(Y[j+1]-Y[j])%MOD, tmp2=((ll)X[k+1]-X[k])*(Y[l+1]-Y[l])%MOD;
					res=(res+d[k][l]*tmp1%MOD*tmp2%MOD)%MOD;
				}
			}
		}
	}
	return (res*500000004)%MOD;
}

void compress(){
	X.push_back(0);
	X.push_back(h);
	Y.push_back(0);
	Y.push_back(w);
	REP(i, n){
		X.push_back(x[i]);
		X.push_back(x[i]+1);
		Y.push_back(y[i]);
		Y.push_back(y[i]+1);
		++xnum[x[i]];
		++ynum[y[i]];
	}
	sort(ALL(X));
	sort(ALL(Y));
	X.erase(unique(ALL(X)), X.end());
	Y.erase(unique(ALL(Y)), Y.end());
	H=X.size()-1;
	W=Y.size()-1;
	REP(i, n){
		int itrx=find(ALL(X), x[i])-X.begin();
		int itry=find(ALL(Y), y[i])-Y.begin();
		used[itrx][itry]=true;
	}
	return;
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>h>>w>>n;
	REP(i, n){
		cin>>x[i]>>y[i];
	}
	compress();
	ll sub=w-xnum[0], sum=(ll)h*w-n;
	REP(i, h-1){
		if(xnum[i]==0 && xnum[i+1]==0){
			ll tmp1=sub%MOD, tmp2=(sum-sub)%MOD;
			ans=(ans+tmp1*tmp2)%MOD;
		}
		sub+=w-xnum[i+1];
	}
	// DEBUG(ans);
	sub=h-ynum[0];
	REP(i, w-1){
		if(ynum[i]==0 && ynum[i+1]==0){
			ll tmp1=sub%MOD, tmp2=(sum-sub)%MOD;
			ans=(ans+tmp1*tmp2)%MOD;
		}
		sub+=h-ynum[i+1];
	}
	// DEBUG(ans);
	ans=(ans+bfs())%MOD;
	cout<<ans<<'\n';
	return 0;
}
