There are $2^{NM}$ matrices $A = (A_{i,j})$ ($1 \le i \le N, 1 \le j \le M$) of size $N$ rows and $M$ columns consisting only of $0$ and $1$. Among them, find the number of matrices that satisfy the following condition, and output the result modulo $998244353$.
- For all $k = 1, 2, \dots, K$, both of the following hold:
- $\sum_{i=1}^{x_k} \sum_{j=1}^{y_k} A_{i,j}$ is odd.
- $\sum_{i=x_k+1}^{N} \sum_{j=y_k+1}^{M} A_{i,j}$ is odd.
Input
The input is given in the following format:
N M K x1 y1 x2 y2 : xK yK
- $2 \le N, M \le 10^9$
- $1 \le K \le 3 \times 10^5$
- $1 \le x_i < N$ ($1 \le i \le K$)
- $1 \le y_i < M$ ($1 \le i \le K$)
- $(x_i, y_i) \ne (x_j, y_j)$ ($i \ne j$)
- All input values are integers.
Output
Print the answer.
Examples
Input 1
3 4 2 2 2 1 3
Output 1
256
Input 2
76 38 4 7 6 3 8 20 26 3 28
Output 2
361562686
Note
For the first sample input, the matrix above in the figure satisfies the condition. However, the matrix below does not satisfy the condition because $\sum_{i=1}^{x_1} \sum_{j=1}^{y_1} A_{i,j}$ is even.
Figure 1: Explanation for the first example.
For the second example, do not forget to output the answer modulo $998244353$.