{"problem":{"name":"Hanjo","description":{"content":"We have a rectangular room that is $H$ meters long and $W$ meters wide.   We will cover this room with $A$ indistinguishable $2$ meters $\\times$ $1$ meters rectangular tatami mats and $B$ indistinguis","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc196_d"},"statements":[{"statement_type":"Markdown","content":"We have a rectangular room that is $H$ meters long and $W$ meters wide.  \nWe will cover this room with $A$ indistinguishable $2$ meters $\\times$ $1$ meters rectangular tatami mats and $B$ indistinguishable $1$ meter $\\times$ $1$ meter square tatami mats. The rectangular mats can be used in either direction: they can be $2$ meters long and $1$ meter wide, or $1$ meter long and $2$ meters wide.  \nHow many ways are there to do this?  \nHere, it is guaranteed that $2A + B = HW$, and two ways are distinguished if they match only after rotation, reflection, or both.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 ≤ H, W$\n*   $HW ≤ 16$\n*   $0 ≤ A, B$\n*   $2A + B = HW$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$H$ $W$ $A$ $B$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc196_d","tags":[],"sample_group":[["2 2 1 2","4\n\nThere are four ways as follows:\n![image](https://img.atcoder.jp/ghi/d01b63c75c91bd87a73e9a4cc43dda28.png)"],["3 3 4 1","18\n\nThere are six ways as follows, and their rotations.\n![image](https://img.atcoder.jp/ghi/b7a492abe22e30683e8f9a7b309acd52.png)"],["4 4 8 0","36"]],"created_at":"2026-03-03 11:01:13"}}