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 <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <cstring>
using namespace std;
typedef long long ll;
const int MOD = 1000000007;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

int H, W, N;
int bx[65], by[65];
vector<int> altx, alty;
int nH, nW;
int xnum[1100000], ynum[1100000];
bool cb[65][65];
int dist[65][65][65][65];
typedef pair<int, int> pint;

long long subsolve() {
    long long res = 0;
    memset(dist, -1, sizeof(dist));
    for (int x = 0; x < nH; ++x) {
        for (int y = 0; y < nW; ++y) {
            if (cb[x][y]) continue;
            queue<pint> que;
            que.push(pint(x, y));
            dist[x][y][x][y] = 0;
            while (!que.empty()) {
                pint cur = que.front();
                que.pop();
                for (int dir = 0; dir < 4; ++dir) {
                    int nx = cur.first + dx[dir];
                    int ny = cur.second + dy[dir];
                    if (nx < 0 || nx >= nH || ny < 0 || ny >= nW) continue;
                    if (cb[nx][ny]) continue;
                    if (dist[x][y][nx][ny] == -1) {
                        dist[x][y][nx][ny] = dist[x][y][cur.first][cur.second] + 1;
                        //dist[nx][ny][x][y] = dist[x][y][cur.first][cur.second] + 1;
                        que.push(pint(nx, ny));
                    }
                }
            }
            for (int nx = 0; nx < nH; ++nx) {
                for (int ny = 0; ny < nW; ++ny) {
                    if (nW * nx + ny <= nW * x + y) continue;
                    if (dist[x][y][nx][ny] == -1) continue;
                    if (cb[nx][ny]) continue;
                    long long ss = ((long long)(altx[x + 1] - altx[x]) * (alty[y + 1] - alty[y])) % MOD;
                    long long st = ((long long)(altx[nx + 1] - altx[nx]) * (alty[ny + 1] - alty[ny])) % MOD;
                    res += (dist[x][y][nx][ny] % MOD) * ss % MOD * st % MOD;
                    res %= MOD;
                }
            }
        }
    }
    return res;
}
long long solve() {
  altx.clear(); alty.clear();
  altx.push_back(0); altx.push_back(H);
  alty.push_back(0); alty.push_back(W);
  for (int i = 0; i < N; ++i) {
	altx.push_back(bx[i]);
	altx.push_back(bx[i] + 1);
	alty.push_back(by[i]);
	alty.push_back(by[i] + 1);
	xnum[bx[i]]++;
	ynum[by[i]]++;
  }
  sort(altx.begin(), altx.end());
  sort(alty.begin(), alty.end());
  altx.erase(unique(altx.begin(), altx.end()), altx.end());
  alty.erase(unique(alty.begin(), alty.end()), alty.end());
  nH = (int)altx.size()-1;
  nW = (int)alty.size()-1;
  memset(cb, 0, sizeof(cb));
  for (int i = 0; i < N; ++i) {
	int itx = lower_bound(altx.begin(), altx.end(), bx[i]) - altx.begin();
	int ity = lower_bound(alty.begin(), alty.end(), by[i]) - alty.begin();
	cb[itx][ity] = true;
  }
  long long all = (long long)H * W - N;
  long long add = 0;
  long long sum = W - xnum[0];
  for (int i = 1; i < H; ++i) {
	if (xnum[i] == 0 && xnum[i-1] == 0) {   // i-1 -> i
	  long long up = sum % MOD;
	  long long down = (all - sum) % MOD;
	  add += (up * down) % MOD;
	  add %= MOD;
	}
	sum += W - xnum[i];
  }
  sum = H - ynum[0];
  for (int i = 1; i < W; ++i) {
	if (ynum[i] == 0 && ynum[i-1] == 0) {   // i-1 -> i
	  long long left = sum % MOD;
	  long long right = (all - sum) % MOD;
	  add += (left * right) % MOD;
	  add %= MOD;
	}
	sum += H - ynum[i];
  }
  long long comp = subsolve();
  long long res = (comp + add) % MOD;
  return res;
}
int main() {
  cin >> H >> W >> N;
  for (int i = 0; i < N; ++i) cin >> bx[i] >> by[i];
  cout << solve() << endl;
}
