{"problem":{"name":"7x7x7","description":{"content":"> In a coordinate space, we want to place three cubes with a side length of $7$ so that the volumes of the regions contained in exactly one, two, three cube(s) are $V_1$, $V_2$, $V_3$, respectively. ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc343_e"},"statements":[{"statement_type":"Markdown","content":"> In a coordinate space, we want to place three cubes with a side length of $7$ so that the volumes of the regions contained in exactly one, two, three cube(s) are $V_1$, $V_2$, $V_3$, respectively.\n\nFor three integers $a$, $b$, $c$, let $C(a,b,c)$ denote the cubic region represented by $(a\\leq x\\leq a+7) \\land (b\\leq y\\leq b+7) \\land (c\\leq z\\leq c+7)$.\nDetermine whether there are nine integers $a_1, b_1, c_1, a_2, b_2, c_2, a_3, b_3, c_3$ that satisfy all of the following conditions, and find one such tuple if it exists.\n\n*   $|a_1|, |b_1|, |c_1|, |a_2|, |b_2|, |c_2|, |a_3|, |b_3|, |c_3| \\leq 100$\n*   Let $C_i = C(a_i, b_i, c_i)\\ (i=1,2,3)$.\n    *   The volume of the region contained in exactly one of $C_1, C_2, C_3$ is $V_1$.\n    *   The volume of the region contained in exactly two of $C_1, C_2, C_3$ is $V_2$.\n    *   The volume of the region contained in all of $C_1, C_2, C_3$ is $V_3$.\n\n## Constraints\n\n*   $0 \\leq V_1, V_2, V_3 \\leq 3 \\times 7^3$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$V_1$ $V_2$ $V_3$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc343_e","tags":[],"sample_group":[["840 84 7","Yes\n0 0 0 0 6 0 6 0 0\n\nConsider the case $(a_1, b_1, c_1, a_2, b_2, c_2, a_3, b_3, c_3) = (0, 0, 0, 0, 6, 0, 6, 0, 0)$.\n![image](https://img.atcoder.jp/abc343/aa534bf0a0e8e3f3487c5eeb540e54dc.png)\nThe figure represents the positional relationship of $C_1$, $C_2$, and $C_3$, corresponding to the orange, cyan, and green cubes, respectively.\nHere,\n\n*   All of $|a_1|, |b_1|, |c_1|, |a_2|, |b_2|, |c_2|, |a_3|, |b_3|, |c_3|$ are not greater than $100$.\n*   The region contained in all of $C_1, C_2, C_3$ is $(6\\leq x\\leq 7)\\land (6\\leq y\\leq 7) \\land (0\\leq z\\leq 7)$, with a volume of $(7-6)\\times(7-6)\\times(7-0)=7$.\n*   The region contained in exactly two of $C_1, C_2, C_3$ is $((0\\leq x < 6)\\land (6\\leq y\\leq 7) \\land (0\\leq z\\leq 7))\\lor((6\\leq x\\leq 7)\\land (0\\leq y < 6) \\land (0\\leq z\\leq 7))$, with a volume of $(6-0)\\times(7-6)\\times(7-0)\\times 2=84$.\n*   The region contained in exactly one of $C_1, C_2, C_3$ has a volume of $840$.\n\nThus, all conditions are satisfied.\n$(a_1, b_1, c_1, a_2, b_2, c_2, a_3, b_3, c_3) = (-10, 0, 0, -10, 0, 6, -10, 6, 1)$ also satisfies all conditions and would be a valid output."],["343 34 3","No\n\nNo nine integers $a_1, b_1, c_1, a_2, b_2, c_2, a_3, b_3, c_3$ satisfy all of the conditions."]],"created_at":"2026-03-03 11:01:14"}}