#include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int,int>
#define pdi pair<db,int>
#define mp make_pair
#define pb push_back
#define enter putchar('\n')
#define space putchar(' ')
#define eps 1e-8
#define mo 974711
#define MAXN 1000005
//#define ivorysi
using namespace std;
typedef long long int64;
typedef double db;
template<class T>
void read(T &res) {
    res = 0;char c = getchar();T f = 1;
    while(c < '0' || c > '9') {
	if(c == '-') f = -1;
	c = getchar();
    }
    while(c >= '0' && c <= '9') {
	res = res * 10 + c - '0';
	c = getchar();
    }
    res *= f;
}
template<class T>
void out(T x) {
    if(x < 0) {x = -x;putchar('-');}
    if(x >= 10) {
	out(x / 10);
    }
    putchar('0' + x % 10);
}
const int MOD = 1000000007;

int H,W,N;
int x[35],y[35];
int sum[MAXN],a[MAXN],nxtr[MAXN],nxtc[MAXN];
int pos[MAXN],ans;
int g[65][65],r,c,f[65][65];
bool vis[65][65];
int dx[] = {0,-1,0,1},dy[] = {1,0,-1,0};

int mul(int a,int b) {
    return 1LL * a * b % MOD;
}
int inc(int a,int b) {
    return a + b >= MOD ? a + b - MOD : a + b;
}
void update(int &x,int y) {
    x = inc(x,y);
}
queue<pii > Q;
void BFS(int x,int y) {
    memset(vis,0,sizeof(vis));
    vis[x][y] = 1;f[x][y] = 0;
    Q.push(mp(x,y));
    while(!Q.empty()) {
	pii t = Q.front();Q.pop();
	for(int k = 0 ; k < 4 ; ++k) {
	    int mx = t.fi + dx[k],my = t.se + dy[k];
	    if(mx >= 1 && mx <= r && my >= 1 && my <= c) {
		if(!vis[mx][my] && g[mx][my] != -1) {
		    f[mx][my] = f[t.fi][t.se] + 1;
		    Q.push(mp(mx,my));
		    vis[mx][my] = 1;
		}
	    }
	}
    }
}
void Solve() {
    read(H);read(W);
    read(N);
    for(int i = 1 ; i <= N ; ++i) {
	read(x[i]);read(y[i]);
	++x[i];++y[i];
    }
    for(int i = 1 ; i <= H ; ++i) a[i] = W;
    a[H + 1] = 0;
    for(int i = 1 ; i <= N ; ++i) --a[x[i]];
    for(int i = 1 ; i <= H ; ++i) {
	sum[i] = inc(sum[i - 1],a[i]);
    }
    memset(pos,0,sizeof(pos));
    for(int i = 1 ; i <= H ; ++i) pos[i] = i;
    for(int i = 1 ; i <= H ; ++i) {
	if(a[i] == W && a[i + 1] == W) {
	    update(ans,mul(sum[i],inc(sum[H],MOD - sum[i])));
	    pos[i + 1] = pos[i];
	    nxtr[pos[i]] = i + 2;
	}
	else nxtr[pos[i]] = i + 1;
    }
    for(int i = 1 ; i <= W ; ++i) a[i] = H;
    a[W + 1] = 0;
    for(int i = 1 ; i <= N ; ++i) a[y[i]]--;
    for(int i = 1 ; i <= W ; ++i) sum[i] = inc(sum[i - 1],a[i]);
    memset(pos,0,sizeof(pos));
    for(int i = 1 ; i <= W ; ++i) pos[i] = i;
    for(int i = 1 ; i <= W ; ++i) {
	if(a[i] == H && a[i + 1] == H) {
	    update(ans,mul(sum[i],inc(sum[W],MOD - sum[i])));
	    pos[i + 1] = pos[i];
	    nxtc[pos[i]] = i + 2;
	}
	else nxtc[pos[i]] = i + 1;
    }
    int tmp = 1;
    while(tmp != H + 1) {tmp = nxtr[tmp];++r;}
    tmp = 1;
    while(tmp != W + 1) {tmp = nxtc[tmp];++c;}
    int p1 = 1;
    for(int i = 1 ; i <= r ; ++i) {
	int p2 = 1;
	for(int j = 1 ; j <= c ; ++j) {
	    g[i][j] = mul(nxtr[p1] - p1,nxtc[p2] - p2);
	    if(nxtr[p1] - p1 == 1 && nxtc[p2] - p2 == 1) {
		for(int k = 1 ; k <= N ; ++k) {
		    if(x[k] == p1 && y[k] == p2) {
			g[i][j] = -1;
			break;
		    }
		}
	    }
	    p2 = nxtc[p2];
	}
	p1 = nxtr[p1];
    }
    tmp = 0;
    for(int i = 1 ; i <= r ; ++i) {
	for(int j = 1 ; j <= c ; ++j) {
	    if(g[i][j] != -1) {
		BFS(i,j);
		for(int k = 1 ; k <= r ; ++k) {
		    for(int h = 1 ; h <= c ; ++h) {
			if(g[k][h] != -1) update(tmp,mul(f[k][h],mul(g[i][j],g[k][h])));
		    }
		}
	    }
	}
    }
    tmp = mul(tmp,(MOD + 1) / 2);
    update(ans,tmp);
    out(ans);enter;
}
int main() {
#ifdef ivorysi
    freopen("f1.in","r",stdin);
#endif
    Solve();
}


Measured memory_bytes: 19840