Problem: Consider a square grid with h rows and w columns with some dominoes on it. Each domino covers exactly two cells of the grid that share a common side. Every cell is covered by at most one domino.

Let's call a placement of dominoes on the grid perfectly balanced if no row and no column contains a pair of cells covered by two different dominoes. In other words, every row and column may contain no covered cells, one covered cell, or two covered cells that belong to the same domino.

You are given a perfectly balanced placement of dominoes on a grid. Find the number of ways to place zero or more extra dominoes on this grid to keep the placement perfectly balanced. Output this number modulo 998 244 353.

Input

The first line contains three integers h, w, and n (1 ≤ h, w ≤ 3600; 0 ≤ n ≤ 2400), denoting the dimensions of the grid and the number of already placed dominoes. The rows are numbered from 1 to h, and the columns are numbered from 1 to w.

Each of the next n lines contains four integers r_{i, 1}, c_{i, 1}, r_{i, 2}, c_{i, 2} (1 ≤ r_{i, 1} ≤ r_{i, 2} ≤ h; 1 ≤ c_{i, 1} ≤ c_{i, 2} ≤ w), denoting the row id and the column id of the cells covered by the i-th domino. Cells (r_{i, 1}, c_{i, 1}) and (r_{i, 2}, c_{i, 2}) are distinct and share a common side.

The given domino placement is perfectly balanced.

Output

Output the number of ways to place zero or more extra dominoes on the grid to keep the placement perfectly balanced, modulo 998 244 353.

Examples

Input


5 7 2
3 1 3 2
4 4 4 5


Output


8


Input


5 4 2
1 2 2 2
4 3 4 4


Output


1


Input


23 42 0


Output


102848351

Note

In the first example, the initial grid looks like this:

<image>

Here are 8 ways to place zero or more extra dominoes to keep the placement perfectly balanced:

<image>

In the second example, the initial grid looks like this:

<image>

No extra dominoes can be placed here.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int Pow(int a, int b, int md, int res = 1) {
  for (; b; b >>= 1, a = 1ll * a * a % md) {
    if (b & 1) res = 1ll * a * res % md;
  }
  return res;
}
const int N = 3610, MOD = 998244353;
int CH, CW, H, W, dpr[N][N], dpc[N][N], first[N], I[N], n, MR[N], MC[N];
int add(int x, int y) {
  int res = x + y;
  if (res >= MOD) res -= MOD;
  return res;
}
int C(int x, int y) {
  if (x - y < 0 || y < 0) return 0;
  return 1ll * first[x] * I[y] % MOD * I[x - y] % MOD;
}
int main() {
  first[0] = 1;
  for (int i = 1; i < N; i++) first[i] = 1ll * first[i - 1] * i % MOD;
  I[N - 1] = Pow(first[N - 1], MOD - 2, MOD);
  for (int i = N - 1; i; i--) {
    I[i - 1] = 1ll * i * I[i] % MOD;
  }
  scanf("%d%d%d", &H, &W, &n);
  CH = H, CW = W;
  for (int i = 1; i <= n; i++) {
    int r1, r2, c1, c2;
    scanf("%d%d%d%d", &r1, &c1, &r2, &c2);
    CH -= !MR[r1];
    MR[r1] = 1;
    CH -= !MR[r2];
    MR[r2] = 1;
    CW -= !MC[c1];
    MC[c1] = 1;
    CW -= !MC[c2];
    MC[c2] = 1;
  }
  dpr[0][0] = dpc[0][0] = dpr[1][0] = dpc[1][0] = 1;
  for (int i = 2; i <= H; i++) {
    dpr[i][0] = 1;
    for (int j = 1; j < N; j++) {
      dpr[i][j] = dpr[i - 1][j];
      if (!MR[i] && !MR[i - 1]) dpr[i][j] = add(dpr[i][j], dpr[i - 2][j - 1]);
    }
  }
  for (int i = 2; i <= W; i++) {
    dpc[i][0] = 1;
    for (int j = 1; j < N; j++) {
      dpc[i][j] = dpc[i - 1][j];
      if (!MC[i] && !MC[i - 1]) dpc[i][j] = add(dpc[i][j], dpc[i - 2][j - 1]);
    }
  }
  int res = 0;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (2 * i + j > CH || 2 * j + i > CW) continue;
      res = add(res, 1ll * first[i] * first[j] % MOD * dpr[H][i] % MOD *
                         dpc[W][j] % MOD * C(CH - 2 * i, j) % MOD *
                         C(CW - 2 * j, i) % MOD);
    }
  }
  printf("%d\n", res);
  return 0;
}