#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define all(x) (x).begin (),(x).end()
#define sqrt(x) sqrt(abs(x))
#define re return
#define sz(x) ((int)(x).size ())
#define prev PREV
#define next NEXT

using ll = long long;
using ii = pair<int, int>;
using ld = long double;
using D = double;
using vi = vector<int>;
using vii = vector<ii>;
using vvi = vector<vi>;
using vs = vector<string>;

template<typename T> T abs (T x) { re x < 0 ? -x : x; }
template<typename T> T sgn (T x) { re x < 0 ? -1 : (x > 0 ? 1 : 0); }
template<typename T> T sqr (T x) { re x * x; }
template<typename T> T gcd (T a, T b) { re a ? gcd (b % a, a) : b; }

const int mod = 1000*1000*1000+7;
int rev2;
int rev3;
int rev6;

int n;
int m;

map<ii, int> num;
ii rct[15000];
int d[15000];
int mark[15000];
int xx[15000];
int yy[15000];
int x[30];
int y[30];
int g[61][61][2][2];
ii gc[61][61][2][2];
int bad[61][61];
vii wx, wy;
vi vx, vy;
int o;
priority_queue<ii> all;
int q;
set<ii> pts;

vii build (vi v, int n) {
	vii w;
	if (v[0] > 0) w.pb (mp (0, v[0] - 1));
	for (int i = 0; i + 1 < sz (v); i++)
		if (v[i] + 1 < v[i + 1])
			w.pb (mp (v[i] + 1, v[i + 1] - 1));
	if (v[sz (v) - 1] + 1 < n)
		w.pb (mp (v[sz (v) - 1] + 1, n - 1));
	for (int i = 0; i < sz (v); i++) w.pb (mp (v[i], v[i]));
	sort (all (w));
	re w;
}

int get (int x, int y, int i, int j) {
	if (num.find (mp (x, y)) != num.end ()) re num[mp (x, y)];
	xx[o] = x;
	yy[o] = y;
	rct[o] = mp (i, j);
	num[mp (x, y)] = o;
	o++;
	re o - 1;
}

int bar;

void upd (int i, int j) {
	if (rct[i].fi > bar) re;
	if (d[i] > j) {
		d[i] = j;
		mark[i] = 1;
		all.push (mp (-d[i], i));
	}
}

int c2c (int a) {
	re ((ll)(a - 1) * a % mod * (a + 1) % mod * rev3) % mod;
}

int self (int a, int b) {
	re ((ll)c2c (a) * b % mod * b + (ll)c2c (b) * a % mod * a) % mod;
}

int same (int a, int b, int c, int dist) {
//	printf ("same %d %d %d %d\n", a, b, c, dist);
	re ((ll)c2c (a) * b % mod * c % mod + (ll)a * a % mod * b % mod * c % mod * (2 * dist + (b + c - 2)) % mod * rev2 % mod) % mod;
}

int diff (int a, int b, int c, int d, int dist) {
	re ((ll)a * b % mod * c % mod * d % mod * (a + b + c + d - 4 + 2 * dist) % mod * rev2) % mod;
}

int power (int a, int b) {
	int c = 1;
	while (b) {
		if (b & 1) c = ((ll)c * a) % mod;
		a = ((ll)a * a) % mod;
		b /= 2;
	}
	re c;
}

int main () {
	rev2 = power (2, mod - 2);
	rev3 = power (3, mod - 2);
	rev6 = power (6, mod - 2);
	scanf ("%d%d", &n, &m);
	scanf ("%d", &q);
	for (int i = 0; i < q; i++) {
		scanf ("%d%d", &x[i], &y[i]);
		pts.insert (mp (x[i], y[i]));
		vx.pb (x[i]);
		vy.pb (y[i]);
	}
	sort (all (vx));
	sort (all (vy));
	vx.resize (unique (all (vx)) - vx.begin ());
	vy.resize (unique (all (vy)) - vy.begin ());
	wx = build (vx, n);
	wy = build (vy, m);
	int nx = sz (wx);
	int ny = sz (wy);
	for (int i = 0; i < nx; i++)
		for (int j = 0; j < ny; j++) {
			bad[i][j] = 1;
			if (wx[i].fi == wx[i].se && wy[j].fi == wy[j].se && pts.count (mp (wx[i].fi, wy[j].fi))) continue;
			bad[i][j] = 0;
			for (int a = 0; a < 2; a++)
				for (int b = 0; b < 2; b++) {
					gc[i][j][a][b] = mp (wx[i].fi + (wx[i].se - wx[i].fi) * a, wy[j].fi + (wy[j].se - wy[j].fi) * b);
					g[i][j][a][b] = get (wx[i].fi + (wx[i].se - wx[i].fi) * a, wy[j].fi + (wy[j].se - wy[j].fi) * b, i, j);
				}
		}
//	printf ("%d\n", o);
	int ans = 0;
	for (int ii = 0; ii < nx; ii++)
		for (int jj = 0; jj < ny; jj++) {
			if (bad[ii][jj]) continue;
//			printf ("%d %d\n", wx[ii].se - wx[ii].fi + 1, wy[jj].se - wy[jj].fi + 1);
			ans = (ans + (ll)self (wx[ii].se - wx[ii].fi + 1, wy[jj].se - wy[jj].fi + 1) * rev2) % mod;
			for (int j = 0; j < o; j++) {
				d[j] = 1e9;
				mark[j] = 0;
			}
			while (!all.empty ()) all.pop ();
			for (int a = 0; a < 2; a++)
				for (int b = 0; b < 2; b++)
					if (!mark[g[ii][jj][a][b]]) {
						d[g[ii][jj][a][b]] = 0;
						mark[g[ii][jj][a][b]] = 1;
						all.push (mp (0, g[ii][jj][a][b]));
					}
			bar = ii + 1;
			while (bar < nx && wx[bar].fi == wx[bar].se) bar++;
			while (!all.empty ()) {
				int j = all.top ().se;
				all.pop ();
				if (mark[j] == 2) continue;
				mark[j] = 2;
				int cx = xx[j];
				int cy = yy[j];
				int p = rct[j].fi;
				int q = rct[j].se;
				int ca = int (cx == wx[p].se);
				int cb = int (cy == wy[q].se);
				for (int a = 0; a < 2; a++)
					for (int b = 0; b < 2; b++) {
						int nx = gc[p][q][a][b].fi;
						int ny = gc[p][q][a][b].se;
						upd (g[p][q][a][b], d[j] + abs (cx - nx) + abs (cy - ny));
					}
				if (cx == wx[p].fi && p > 0 && !bad[p - 1][q]) upd (g[p - 1][q][1][cb], d[j] + 1);
				if (cx == wx[p].se && p + 1 < nx && !bad[p + 1][q]) upd (g[p + 1][q][0][cb], d[j] + 1);
				if (cy == wy[q].fi && q > 0 && !bad[p][q - 1]) upd (g[p][q - 1][ca][1], d[j] + 1);
				if (cy == wy[q].se && q + 1 < ny && !bad[p][q + 1]) upd (g[p][q + 1][ca][0], d[j] + 1);
			}
//			printf ("self = %d\n", ans);
			for (int pp = 0; pp < nx; pp++)
				for (int qq = 0; qq < ny; qq++) {
					if (mp (pp, qq) > mp (ii, jj)) continue;
					if (bad[pp][qq]) continue;
					int dist = 1e9;
					for (int a = 0; a < 2; a++)
						for (int b = 0; b < 2; b++)
							dist = min (dist, d[g[pp][qq][a][b]]);
					if (dist == 0) continue;
					if (pp == ii) ans = (ans + same (wx[ii].se - wx[ii].fi + 1, wy[jj].se - wy[jj].fi + 1, wy[qq].se - wy[qq].fi + 1, dist)) % mod; else
					if (qq == jj) ans = (ans + same (wy[jj].se - wy[jj].fi + 1, wx[ii].se - wx[ii].fi + 1, wx[pp].se - wx[pp].fi + 1, dist)) % mod; else
								  ans = (ans + diff (wx[ii].se - wx[ii].fi + 1, wy[jj].se - wy[jj].fi + 1, wx[pp].se - wx[pp].fi + 1, wy[qq].se - wy[qq].fi + 1, dist)) % mod;
//					printf ("%d %d - %d %d = %d = %d\n", ii, jj, pp, qq, ans, dist);
				}
		}
	cout << ((ll)ans) % mod << endl;
	cerr << clock () << endl;
	return 0;
}

Measured memory_bytes: 1280