H. osu!mania
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are an avid osu!mania player, a piano-style rhythm game where you press notes that appear on the screen at the right time. You live in a neighborhood of osu!mania players, conveniently shaped in a grid. To prepare for the tournament, you decide to collect some beatmaps from other people in the neighborhood.

Your house is in the first row and first column. To walk around in the neighborhood, you can only increase your row number, decrease your row number, or increase your column number. You also do not want to visit a house that you have already visited before. Your walk will end immediately once you have visited all the houses with beatmaps. In order to decide which path to take, you want to compute how many paths visit every house with a beatmap. Since there may be many paths, output the answer mod $$$998244353$$$.

Input

The first line contains three integers $$$r$$$, $$$c$$$, and $$$k$$$ ($$$1 \leq r, c \leq 10^9$$$, $$$1 \leq k \leq 10^5$$$) — the number of rows, columns, and beatmaps, respectively.

The following $$$k$$$ lines contain two integers $$$a, b$$$ ($$$1 \leq a \leq r$$$, $$$1 \leq b \leq c$$$) — denoting that the person living in the house at row $$$a$$$ and column $$$b$$$ has a beatmap. It is guaranteed that no $$$(a, b)$$$ pair appears twice in this list.

Output

Output the number of walks that visit every house with a beatmap, mod $$$998244353$$$.

Examples
Input
1 2 1
1 2
Output
1
Input
2 2 1
1 2
Output
2