#include <bits/stdc++.h>

#ifdef DEBUG
#define debug(...) fprintf(stderr, __VA_ARGS__)
#else
#define debug(...)
#endif

#ifdef __WIN32
#define LLFORMAT "I64"
#define Rand() ((rand() << 15) + rand())
#else
#define LLFORMAT "ll"
#define Rand() (rand())
#endif

using namespace std;

const int maxn = 62, maxm = 1e6 + 10, mod = 1e9 + 7, dx[] = {-1, 1, 0, 0}, dy[] = {0, 0, -1, 1}, oo = 1e9, i2 = mod + 1 >> 1;

int k, n, m, H, W, f[maxm], ans, nn, mm;
set<pair<int, int> > blk;
vector<int> allx, ally;
priority_queue<pair<pair<int, int>, pair<int, int> >, vector<pair<pair<int, int>, pair<int, int> > >, greater<pair<pair<int, int>, pair<int, int> > > > heap;
pair<int, int> d[100][100], id[maxn][maxn][4];
int x[100][100], y[100][100], ex[100];
bool ban[100][100], banx[100];

struct rect {
	int x1, y1, x2, y2;
	bool blk;

	rect() { blk = 0; }
	rect(int x1, int y1, int x2, int y2): x1(x1), y1(y1), x2(x2), y2(y2) { blk = 0; }

	inline void get(int t, int &x, int &y) const {
		x = t & 2 ? x2 : x1;
		y = t & 1 ? y2 : y1;
		return;
	}
} rng[maxn][maxn];

int F(int l) {
	if(~f[l]) {
		return f[l];
	}
	int &x = f[l];
	if(l <= 1) {
		return x = 0;
	}
	return x = ((long long) l * (l - 1) + F(l - 1)) % mod;
}

int F(int l, int d, int a, int b) {
	return (((((long long) a * (a - 1) * b + (long long) b * (b - 1) * a) >> 1) + (long long) a * b * d) % mod * l % mod * l + (long long) F(l) * a % mod * b) % mod;
}

int F(int n, int m) {
	if(!m) {
		return 0;
	}
	if(m == 1) {
		return (long long) F(n) * i2 % mod;
	}
	if(m & 1) {
		return ((long long) F(n, m - 1) + (long long) F(1, n) + (long long) F(n, 1, m - 1, 1)) % mod;
	}
	return (((long long) F(n, m >> 1) << 1) + (long long) F(n, 1, m >> 1, m >> 1)) % mod;
}

int D(int n, int m) {
	return (long long) (m + n - 2) * n % mod * m % mod * i2 % mod;
}

int main() {
	memset(f, -1, sizeof f);
	scanf("%d%d%d", &H, &W, &k);
	allx.push_back(0);
	ally.push_back(0);
	for (int i = 1; i <= k; ++i) {
		int x, y;
		scanf("%d%d", &x, &y);
		if(x + 1 < H) {
			allx.push_back(x + 1);
		}
		allx.push_back(x);
		if(y + 1 < W) {
			ally.push_back(y + 1);
		}
		ally.push_back(y);
		blk.insert(make_pair(x, y));
	}
	sort(allx.begin(), allx.end());
	sort(ally.begin(), ally.end());
	allx.resize(unique(allx.begin(), allx.end()) - allx.begin());
	ally.resize(unique(ally.begin(), ally.end()) - ally.begin());
	n = allx.size();
	m = ally.size();
	allx.push_back(H);
	ally.push_back(W);
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < m; ++j) {
			int x1, y1, x2, y2;
			rng[i][j] = rect(x1 = allx[i], y1 = ally[j], x2 = allx[i + 1] - 1, y2 = ally[j + 1] - 1);
			if(x1 == x2 && y1 == y2 && blk.find(make_pair(x1, y1)) != blk.end()) {
				rng[i][j].blk = 1;
			}
		}
	}
	for (int i = 0; i < n; ++i) {
		mm = 0;
		for (int j = 0; j < m; ++j) {
			x[nn][mm] = rng[i][j].x1;
			y[nn][mm] = rng[i][j].y1;
			ban[nn][mm] = rng[i][j].blk;
			id[i][j][0] = make_pair(nn, mm);
			++mm;
			if(rng[i][j].y2 > rng[i][j].y1) {
				x[nn][mm] = rng[i][j].x1;
				y[nn][mm] = rng[i][j].y2;
				ban[nn][mm] = rng[i][j].blk;
				id[i][j][1] = make_pair(nn, mm);
				++mm;
			}
			else {
				id[i][j][1] = id[i][j][0];
			}
		}
		++nn;
		if(rng[i][0].x1 < rng[i][0].x2) {
			mm = 0;
			for (int j = 0; j < m; ++j) {
				x[nn][mm] = rng[i][j].x2;
				y[nn][mm] = rng[i][j].y1;
				ban[nn][mm] = rng[i][j].blk;
				id[i][j][2] = make_pair(nn, mm);
				++mm;
				if(rng[i][j].y2 > rng[i][j].y1) {
					x[nn][mm] = rng[i][j].x2;
					y[nn][mm] = rng[i][j].y2;
					ban[nn][mm] = rng[i][j].blk;
					id[i][j][3] = make_pair(nn, mm);
					++mm;
				}
				else {
					id[i][j][3] = id[i][j][2];
				}
			}
			++nn;
		}
		else {
			for (int j = 0; j < m; ++j) {
				id[i][j][2] = id[i][j][0];
				id[i][j][3] = id[i][j][1];
			}
		}
	}
	for (int i = 0; i < nn; ++i) {
		for (int j = 0; j < mm; ++j) {
			banx[i] |= ban[i][j];
		}
	}
	for (int i = 0; i < nn; ++i) {
		ex[i] = i;
		while(banx[ex[i]]) {
			++ex[i];
		}
		ex[i] = min(ex[i], nn - 1);
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < m; ++j) {
			if(rng[i][j].blk) {
				continue;
			}
			int lx = rng[i][j].x2 - rng[i][j].x1 + 1, ly = rng[i][j].y2 - rng[i][j].y1 + 1;
			ans = (F(lx, ly) + ans) % mod;
			for (int i = 0; i < nn; ++i) {
				for (int j = 0; j < mm; ++j) {
					d[i][j] = make_pair(oo, -1);
				}
			}
			int EX = -1;
			for (int c = 0; c < 4; ++c) {
				auto &t = id[i][j][c];
				heap.push(make_pair(d[t.first][t.second] = make_pair(0, c), make_pair(t.first, t.second)));
				EX = max(EX, ex[t.first]);
			}
			while(!heap.empty()) {
				auto T = heap.top();
				heap.pop();
				auto &t = T.first;
				int &i = T.second.first, &j = T.second.second;
				if(t != d[i][j]) {
					continue;
				}
				int &dd = t.first, &xx = x[i][j], &yy = y[i][j];
				for (register int k = 0; k < 4; ++k) {
					register int x = i + dx[k], y = j + dy[k];
					if(x >= 0 && y >= 0 && x <= EX && y < mm && !ban[x][y]) {
						register int s = dd + (k < 2 ? abs(::x[x][y] - xx) : abs(::y[x][y] - yy));
						if(s < d[x][y].first) {
							heap.push(make_pair(d[x][y] = make_pair(s, t.second), make_pair(x, y)));
						}
					}
				}
			}
			for (int a = 0; a <= i; ++a) {
				for (int b = 0; b < m; ++b) {
					if(a == i && b == j) {
						break;
					}
					if(!rng[a][b].blk) {
						int c = 0;
						for (int cc = 1; cc < 4; ++cc) {
							auto &t = id[a][b][cc], &s = id[a][b][c];
							if(d[t.first][t.second] < d[s.first][s.second]) {
								c = cc;
							}
						}
						auto &s = id[a][b][c];
						int k = d[s.first][s.second].second, dst = d[s.first][s.second].first, x1, y1, x2, y2;
						rng[i][j].get(k, x1, y1);
						rng[a][b].get(c, x2, y2);
						if(dst == abs(x1 - x2) + abs(y1 - y2)) {
							if(i == a) {
								ans = (F(lx, j < b ? rng[a][b].y1 - rng[i][j].y2 : rng[i][j].y1 - rng[a][b].y2, ly, rng[a][b].y2 - rng[a][b].y1 + 1) + ans) % mod;
								continue;
							}
							if(j == b) {
								ans = (F(ly, rng[i][j].x1 - rng[a][b].x2, lx, rng[a][b].x2 - rng[a][b].x1 + 1) + ans) % mod;
								continue;
							}
						}
						x1 = lx;
						y1 = ly;
						x2 = rng[a][b].x2 - rng[a][b].x1 + 1;
						y2 = rng[a][b].y2 - rng[a][b].y1 + 1;
						int s1 = (long long) x1 * y1 % mod, s2 = (long long) x2 * y2 % mod;
						ans = ((long long) D(x1, y1) * s2 + (long long) D(x2, y2) * s1 + (long long) dst * s1 % mod * s2 + ans) % mod;
					}
				}
			}
		}
	}
	printf("%d\n", ans);
	return 0;
}


Measured memory_bytes: 35456