$\underline{\text { Fon-der-Flaass }}$ D:

In the vertices of a cube, numbers $1^2, 2^2, \ldots, 8^2$ are placed (one number in each vertex). For each edge, the product of the numbers at its ends is calculated. Find the maximum possible sum of all these products.
We will color the vertices of a cube in two colors such that the ends of each edge are of different colors. Let the numbers $a_{1}, a_{2}, a_{3}, a_{4}$ be placed in the vertices of one color, and the numbers $b_{1}, b_{2}, b_{3}, b_{4}$ in the vertices of the other color, with numbers having the same indices placed in opposite vertices. Then, as it is easy to verify, the specified sum of products will be equal to $\left(a_{1}+a_{2}+a_{3}+a_{4}\right)\left(b_{1}+b_{2}+b_{3}+b_{4}\right)-\left(a_{1} b_{1}+a_{2} b_{2}+a_{3} b_{3}+a_{4} b_{4}\right)$. By the Cauchy-Schwarz inequality,

$$
\left(a_{1}+a_{2}+a_{3}+a_{4}\right)\left(b_{1}+b_{2}+b_{3}+b_{4}\right) \leq 1 / 4\left(a_{1}+a_{2}+a_{3}+a_{4}+b_{1}+b_{2}+b_{3}+b_{4}\right)^{2}=1 / 4\left(1^{2}+2^{2}+\ldots+8^{2}\right)^{2}
$$

with equality holding only when $a_{1}+a_{2}+a_{3}+a_{4}=b_{1}+b_{2}+b_{3}+b_{4}$ (1).

On the other hand, the sum $S=a_{1} b_{1}+a_{2} b_{2}+a_{3} b_{3}+a_{4} b_{4}$, where $a_{i}$ and $b_{i}$ are the numbers $1^{2}, 2^{2}, \ldots, 8^{2}$, is minimized when $8^{2}$ is multiplied by $1^{2}, 7^{2}$ by $2^{2}, 6^{2}$ by $3^{2}, 5^{2}$ by $4^{2}$ (2). Indeed, suppose $8^{2}$ is multiplied by $a^{2}$ and $1^{2}$ by $b^{2}$. It is clear that multiplying $8^{2}$ by $1^{2}$ and $a^{2}$ by $b^{2}$ will decrease the sum $S$. Similarly, we can show that multiplying $7^{2}$ by $2^{2}$ will also decrease $S$, and so on.

Since $1^{2}+4^{2}+6^{2}+7^{2}=102=2^{2}+3^{2}+5^{2}+8^{2}$, we can achieve the simultaneous satisfaction of the maximum condition (1) and the minimum condition (2): for this, we need to place the numbers $1^{2}, 4^{2}, 6^{2},$ and $7^{2}$ in the vertices of one color, and the remaining numbers in the vertices of the other color such that $8^{2}$ and $1^{2}, 7^{2}$ and $2^{2}, 6^{2}$ and $3^{2}, 5^{2}$ and $4^{2}$ are in opposite vertices. This arrangement will give the desired maximum sum of products, equal to $102^{2}-\left(8^{2} \cdot 1^{2}+7^{2} \cdot 2^{2}+6^{2} \cdot 3^{2}+5^{2} \cdot 4^{2}\right)=10404-984=9420$.

## Answer

9420.