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;
const int maxn = 4000 + 50;
const int maxm = 2000000 + 1000;
const int maxt = 3000000 + 100;
const int maxk = 10 + 3;
const long long unit = 1LL;
const int INF = 0x3f3f3f3f;
const long long Inf = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-3;
const double inf = 1e15;
const double pi = acos(-1.0);
const long long mod = 998244353LL, gg = 3LL, inv2 = 499122177LL;
inline long long read() {
  long long x = 0;
  bool t = false;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') t = true, ch = getchar();
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - 48, ch = getchar();
  return t ? -x : x;
}
long long h, w, n;
long long rf[maxn][maxn], cf[maxn][maxn];
bool rused[maxn], cused[maxn];
long long inv[maxn], fac[maxn], ifac[maxn];
void GetInv(long long n) {
  inv[1] = fac[0] = fac[1] = ifac[0] = ifac[1] = 1;
  for (register int i = (2); i <= (n); ++i) {
    inv[i] = ((mod - mod / i)) * inv[mod % i] % mod;
    fac[i] = fac[i - 1] * i % mod;
    ifac[i] = ifac[i - 1] * inv[i] % mod;
  }
}
inline long long C(long long n, long long m) {
  if (m > n) return 0;
  return fac[n] * ifac[m] % mod * ifac[n - m] % mod;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  GetInv(maxn - 10);
  cin >> h >> w >> n;
  long long r1, c1, r2, c2;
  for (long long i = 1; i <= n; ++i) {
    cin >> r1 >> c1 >> r2 >> c2;
    rused[r1] = rused[r2] = true;
    cused[c1] = cused[c2] = true;
  }
  long long rcnt = 0, ccnt = 0;
  for (long long i = 1; i <= h; ++i) rcnt += rused[i];
  for (long long i = 1; i <= w; ++i) ccnt += cused[i];
  rf[0][0] = rf[1][0] = 1;
  for (long long i = 2; i <= h; ++i) {
    rf[i][0] = 1;
    for (long long j = 1; j <= h / 2; ++j) {
      if (rused[i] || rused[i - 1])
        rf[i][j] = rf[i - 1][j];
      else
        rf[i][j] = (rf[i - 1][j] + rf[i - 2][j - 1]) % mod;
    }
  }
  cf[0][0] = cf[1][0] = 1;
  for (long long i = 2; i <= w; ++i) {
    cf[i][0] = 1;
    for (long long j = 1; j <= w / 2; ++j) {
      if (cused[i] || cused[i - 1])
        cf[i][j] = cf[i - 1][j];
      else
        cf[i][j] = (cf[i - 1][j] + cf[i - 2][j - 1]) % mod;
    }
  }
  long long ans = 0;
  for (long long dh = 0; dh <= w / 2; ++dh) {
    for (long long dv = 0; dv <= h / 2; ++dv) {
      long long r = rf[h][dv] * C(h - 2 * dv - rcnt, dh) % mod;
      long long c = cf[w][dh] * C(w - 2 * dh - ccnt, dv) % mod;
      (ans += r * c % mod * fac[dh] % mod * fac[dv] % mod) %= mod;
    }
  }
  cout << ans << '\n';
  return 0;
}