{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eThere is a $n\\times m$ board, a chess want to go to the position \u003cbr\u003e$(n, m)$ from the position $(1, 1)$.\u003cbr\u003eThe chess is able to go to position $(x_2, y_2)$ from the position $(x_1, y_1)$, only and if only $x_1, y_1, x_2, y_2$ is satisfied that $(x_2 - x_1)^2+(y_2 - y_1)^2 \u003d 5, ~x_2 \u0026gt; x_1,~ y_2 \u0026gt; y_1$.\u003cbr\u003eUnfortunately, there are some obstacles on the board. And the chess never can stay on the grid where has a obstacle.\u003cbr\u003eI want you to tell me, There are how may ways the chess can achieve its goal. \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input consists of multiple test cases.\u003cbr\u003eFor each test case:\u003cbr\u003eThe first line is three integers, $n, m, r, (1\\leq n, m\\leq 10^{18}, 0 \\leq r\\leq 100)$, denoting the height of the board, the weight of the board, and the number of the obstacles on the board.\u003cbr\u003eThen follow $r$ lines, each lines have two integers, $x, y(1\\leq x\\leq n, 1\\leq y\\leq m)$, denoting the position of the obstacles. please note there aren\u0027t never a obstacles at position $(1, 1)$."}},{"title":"Output","value":{"format":"HTML","content":"For each test case,output a single line \"Case #x: y\", where x is the case number, starting from 1. And y is the answer after module $110119$."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1 1 0\r\n3 3 0\r\n4 4 1\r\n2 1\r\n4 4 1\r\n3 2\r\n7 10 2\r\n1 2\r\n7 1\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: 1\r\nCase #2: 0\r\nCase #3: 2\r\nCase #4: 1\r\nCase #5: 5\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}