5.1. At the vertices of a cube, numbers $\pm 1$ are placed, and on its faces - numbers equal to the product of the numbers at the vertices of that face. Find all possible values that the sum of these 14 numbers can take. In your answer, specify their product.
Answer: -20160.

Solution. It is obvious that the maximum value of the sum is 14. Note that if we change the sign of one of the vertices, the sum of the numbers in the vertices will increase or decrease by 2. On the other hand, the signs of three faces will change. If their sum was $1, -1, 3, -3$, it will become $-1, 1, -3$, or 3, respectively, i.e., it will change by 2 or 6. It is clear that if we add two sums, the remainder when divided by 4 does not change. Therefore, we can obtain the numbers $10, 6, 2, -2$, $-6, -10$. The number -14, obviously, cannot be obtained, since this would require making all numbers equal to -1. For the other values, it is easy to construct corresponding examples.