{"raw_statement":[{"iden":"problem statement","content":"#nck { width: 30px; height: auto; }Consider all integers between $1$ and $2N$, inclusive. Snuke wants to divide these integers into $N$ pairs such that:\n\n*   Each integer between $1$ and $2N$ is contained in exactly one of the pairs.\n*   In exactly $A$ pairs, the difference between the two integers is $1$.\n*   In exactly $B$ pairs, the difference between the two integers is $2$.\n*   In exactly $C$ pairs, the difference between the two integers is $3$.\n\nNote that the constraints guarantee that $N = A + B + C$, thus no pair can have the difference of $4$ or more.\nCompute the number of ways to do this, modulo $10^9+7$."},{"iden":"constraints","content":"*   $1 ≤ N ≤ 5000$\n*   $0 ≤ A, B, C$\n*   $A + B + C = N$"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$ $A$ $B$ $C$"},{"iden":"sample input 1","content":"3 1 2 0"},{"iden":"sample output 1","content":"2\n\nThere are two possibilities: $1-2, 3-5, 4-6$ or $1-3, 2-4, 5-6$."},{"iden":"sample input 2","content":"600 100 200 300"},{"iden":"sample output 2","content":"522158867"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}