#abc343e. E - 7x7x7

E - 7x7x7

Score: 475475 points

问题陈述

在一个坐标空间中,我们希望放置三个边长为 77 的立方体,使得恰好被一个、两个、三个立方体包含的区域的体积分别为 V1V_1V2V_2V3V_3

对于三个整数 aabbcc,令 C(a,b,c)C(a,b,c) 表示由条件 (axa+7)(a\leq x\leq a+7)(byb+7)(b\leq y\leq b+7)(czc+7)(c\leq z\leq c+7) 确定的立方体区域。

确定是否存在九个整数 a1,b1,c1,a2,b2,c2,a3,b3,c3a_1, b_1, c_1, a_2, b_2, c_2, a_3, b_3, c_3 满足所有以下条件,并在存在时找出一组这样的数。

  • $|a_1|, |b_1|, |c_1|, |a_2|, |b_2|, |c_2|, |a_3|, |b_3|, |c_3| \leq 100$
  • Ci=C(ai,bi,ci) (i=1,2,3)C_i = C(a_i, b_i, c_i)\ (i=1,2,3)
    • 恰好被 C1,C2,C3C_1, C_2, C_3 中的一个立方体包含的区域的体积是 V1V_1
    • 恰好被 C1,C2,C3C_1, C_2, C_3 中的两个立方体包含的区域的体积是 V2V_2
    • C1,C2,C3C_1, C_2, C_3 全部包含的区域的体积是 V3V_3

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

In a coordinate space, we want to place three cubes with a side length of 77 so that the volumes of the regions contained in exactly one, two, three cube(s) are V1V_1, V2V_2, V3V_3, respectively.

For three integers aa, bb, cc, let C(a,b,c)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)$.

Determine whether there are nine integers a1,b1,c1,a2,b2,c2,a3,b3,c3a_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.

  • $|a_1|, |b_1|, |c_1|, |a_2|, |b_2|, |c_2|, |a_3|, |b_3|, |c_3| \leq 100$
  • Let Ci=C(ai,bi,ci) (i=1,2,3)C_i = C(a_i, b_i, c_i)\ (i=1,2,3).
    • The volume of the region contained in exactly one of C1,C2,C3C_1, C_2, C_3 is V1V_1.
    • The volume of the region contained in exactly two of C1,C2,C3C_1, C_2, C_3 is V2V_2.
    • The volume of the region contained in all of C1,C2,C3C_1, C_2, C_3 is V3V_3.

Constraints

  • 0V1,V2,V33×730 \leq V_1, V_2, V_3 \leq 3 \times 7^3
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

V1V_1 V2V_2 V3V_3

Output

If no nine integers a1,b1,c1,a2,b2,c2,a3,b3,c3a_1, b_1, c_1, a_2, b_2, c_2, a_3, b_3, c_3 satisfy all of the conditions in the problem statement, print No. Otherwise, print such integers in the following format. If multiple solutions exist, you may print any of them.

Yes

a1a_1 b1b_1 c1c_1 a2a_2 b2b_2 c2c_2 a3a_3 b3b_3 c3c_3

Sample Input 1

840 84 7

Sample Output 1

Yes
0 0 0 0 6 0 6 0 0

Consider 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)$.

The figure represents the positional relationship of C1C_1, C2C_2, and C3C_3, corresponding to the orange, cyan, and green cubes, respectively.

Here,

  • All of $|a_1|, |b_1|, |c_1|, |a_2|, |b_2|, |c_2|, |a_3|, |b_3|, |c_3|$ are not greater than 100100.
  • The region contained in all of C1,C2,C3C_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 (76)×(76)×(70)=7(7-6)\times(7-6)\times(7-0)=7.
  • The region contained in exactly two of C1,C2,C3C_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 (60)×(76)×(70)×2=84(6-0)\times(7-6)\times(7-0)\times 2=84.
  • The region contained in exactly one of C1,C2,C3C_1, C_2, C_3 has a volume of 840840.

Thus, all conditions are satisfied.

$(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.

Sample Input 2

343 34 3

Sample Output 2

No

No nine integers a1,b1,c1,a2,b2,c2,a3,b3,c3a_1, b_1, c_1, a_2, b_2, c_2, a_3, b_3, c_3 satisfy all of the conditions.

update @ 2024/3/10 01:16:45