#include <bits/stdc++.h>
const int MAXN = 4e3 + 1, mod = 998244353;
using namespace std;
namespace guyan {
int n, m, N, M, f[2][MAXN][MAXN], res, ans, C[MAXN][MAXN], fac[MAXN],
    mark[2][MAXN], k;
inline int plus(const int& a, const int& b) {
  return a + b >= mod ? a + b - mod : a + b;
}
inline void dp(int mark[], int f[][MAXN], const int& n) {
  f[0][0] = 1;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= n; ++j) {
      f[i][j] = f[i - 1][j];
      if (j && !mark[i] && !mark[i - 1])
        f[i][j] = plus(f[i][j], f[i - 2][j - 1]);
    }
  }
}
int main(void) {
  cin >> N >> M >> k;
  for (int i = 1, x1, x2, y1, y2; i <= k; ++i) {
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    if (mark[0][x1] || mark[0][x2] || mark[1][y1] || mark[1][y2])
      return puts("0"), 0;
    mark[0][x1] = 1, mark[0][x2] = 1, mark[1][y1] = 1, mark[1][y2] = 1;
  }
  mark[0][0] = mark[1][0] = 1;
  for (int i = 1; i <= N; ++i) n += (mark[0][i] == 0);
  for (int i = 1; i <= M; ++i) m += (mark[1][i] == 0);
  fac[0] = fac[1] = 1;
  for (int i = 2, t = max(N, M); i <= t; ++i)
    fac[i] = 1LL * i * fac[i - 1] % mod;
  C[0][0] = 1;
  for (int i = 1, t = max(N, M); i <= t; ++i) {
    C[i][0] = 1;
    for (int j = 1; j <= i; ++j) C[i][j] = plus(C[i - 1][j], C[i - 1][j - 1]);
  }
  dp(mark[0], f[0], N);
  dp(mark[1], f[1], M);
  for (int i = 0; (i << 1) <= n; ++i)
    for (int j = 0; (j << 1) <= m; ++j) {
      int blankN = n - (i << 1);
      int blankM = m - (j << 1);
      res = 1LL * f[0][N][i] * f[1][M][j] % mod;
      res = 1LL * res * C[blankN][j] % mod;
      res = 1LL * res * C[blankM][i] % mod;
      res = 1LL * res * fac[i] % mod;
      res = 1LL * res * fac[j] % mod;
      ans = plus(ans, res);
    }
  printf("%d", ans);
  return 0;
}
}  // namespace guyan
int main(void) { return guyan::main(); }
