{"raw_statement":[{"iden":"problem statement","content":"$A + B$ balls are arranged in a row. The leftmost $A$ balls are colored red, and the rightmost $B$ balls are colored blue.\nYou perform the following operation:\n\n*   First, you choose two integers $s, t$ such that $1 \\leq s, t \\leq A + B$.\n*   Then, you repeat the following step $A + B$ times: In each step, you remove the first ball or the $s$\\-th ball (if it exists) or the $t$\\-th ball (if it exists, all indices are 1-based) from left in the row, and give it to Snuke.\n\nIn how many ways can you give the balls to Snuke? Compute the answer modulo $10^9 + 7$.\nHere, we consider two ways to be different if for some $k$, the $k$\\-th ball given to Snuke has different colors. In particular, the choice of $s, t$ doesn't matter. Also, we don't distinguish two balls of the same color."},{"iden":"constraints","content":"*   $1 \\leq A, B \\leq 2000$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$A$ $B$"},{"iden":"sample input 1","content":"3 3"},{"iden":"sample output 1","content":"20\n\nThere are $20$ ways to give $3$ red balls and $3$ blue balls. It turns out that all of them are possible.\nHere is an example of the operation (`r` stands for red, `b` stands for blue):\n\n*   You choose $s = 3, t = 4$.\n*   Initially, the row looks like `rrrbbb`.\n*   You remove $3$rd ball (`r`) and give it to Snuke. Now the row looks like `rrbbb`.\n*   You remove $4$th ball (`b`) and give it to Snuke. Now the row looks like `rrbb`.\n*   You remove $1$st ball (`r`) and give it to Snuke. Now the row looks like `rbb`.\n*   You remove $3$rd ball (`b`) and give it to Snuke. Now the row looks like `rb`.\n*   You remove $1$st ball (`r`) and give it to Snuke. Now the row looks like `b`.\n*   You remove $1$st ball (`b`) and give it to Snuke. Now the row is empty.\n\nThis way, Snuke receives balls in the order `rbrbrb`."},{"iden":"sample input 2","content":"4 4"},{"iden":"sample output 2","content":"67\n\nThere are $70$ ways to give $4$ red balls and $4$ blue balls. Among them, only `bbrrbrbr`, `brbrbrbr`, and `brrbbrbr` are impossible."},{"iden":"sample input 3","content":"7 9"},{"iden":"sample output 3","content":"7772"},{"iden":"sample input 4","content":"1987 1789"},{"iden":"sample output 4","content":"456315553"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}