The numbers $x, y, z$ and $w$ in the figure are all different integers, greater than 1, and have been placed in the boxes such that each number (starting from $y$) is a divisor of the number in the box to the left.

| $x$ | $y$ | $z$ | $w$ |
| :--- | :--- | :--- | :--- |

Find all possible solutions for $x, y, z$ and $w$ knowing that their sum is 329.
Solution

From the problem statement, we know that

$$
1<w<z<y<x<329
$$

Since $w$ is a divisor of $z$ and $z$ is a divisor of $y$, then $w$ is a divisor of $y$. But $y$ is a divisor of $x$, so $w$ is also a divisor of $x$ and, therefore, of each number placed in the houses. The number $w$ is thus a divisor of the sum, $329=7 \times 47$, and we conclude from this that $w=7$ or $w=47$. Let's consider each case.

- Suppose first that $w=47$. Using the same argument for $z$ as for $w$, we conclude that $z$ is a divisor of the sum

$$
x+y+z=47 \times 2 \times 3
$$

Remember that $w$ is a divisor of $z$ and $w<z<329$. Then $z=47 \times 2$ or $z=47 \times 3$. But $z<y<x$ and therefore to achieve (.11) it is necessary that $z<47 \times 2$. We conclude in this way that there is no solution with $w=47$.

- Suppose now that $w=7$. As in the previous case, $z$ must be a divisor of the sum

$$
z+y+x=7 \times 2 \times 23
$$

The only alternatives for $z$ are $z=7 \times 23$ and $z=7 \times 2$. But to have $z<y<x$ and to achieve (.12) it is necessary that $z<7 \times 23$. Therefore, $z=7 \times 2$. Now, $y$ is a divisor of the sum

$$
y+x=7 \times 2 \times 2 \times 11
$$

Since $z$ is a divisor of $y$ and $z<y$, then $y=7 \times 2 \times 2$ or $y=7 \times 2 \times 11$. But $y<x$ and to achieve (.13) it is necessary that $y<7 \times 2 \times 11$.

We conclude thus that the only possible solution is

$$
w=7, \quad z=7 \times 2, \quad y=7 \times 2 \times 2, \quad x=7 \times 2 \times 2 \times 10
$$