{"problem":{"name":"Knight","description":{"content":"There is a knight - the chess piece - at the origin $(0, 0)$ of a two-dimensional grid. When the knight is at the square $(i, j)$, it can be moved to either $(i+1,j+2)$ or $(i+2, j+1)$. In how many wa","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc145_d"},"statements":[{"statement_type":"Markdown","content":"There is a knight - the chess piece - at the origin $(0, 0)$ of a two-dimensional grid.\nWhen the knight is at the square $(i, j)$, it can be moved to either $(i+1,j+2)$ or $(i+2, j+1)$.\nIn how many ways can the knight reach the square $(X, Y)$?\nFind the number of ways modulo $10^9 + 7$.\n\n## Constraints\n\n*   $1 \\leq X \\leq 10^6$\n*   $1 \\leq Y \\leq 10^6$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$X$ $Y$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc145_d","tags":[],"sample_group":[["3 3","2\n\nThere are two ways: $(0,0) \\to (1,2) \\to (3,3)$ and $(0,0) \\to (2,1) \\to (3,3)$."],["2 2","0\n\nThe knight cannot reach $(2,2)$."],["999999 999999","151840682\n\nPrint the number of ways modulo $10^9 + 7$."]],"created_at":"2026-03-03 11:01:14"}}