72nd Czech and Slovak Mathematical Olympiad
# Edited by
Pavel Calábek
Translated into English by
Tomáš Bárta
## First Round of the 72nd Czech and Slovak Mathematical Olympiad
Problems for the take-home part
(till November 2022)
$\mathbb{N} /$ [ூ
1. Solve the following system of equations in the domain of real numbers
$$
\begin{aligned}
2 x+\lfloor y\rfloor & =2022, \\
3 y+\lfloor 2 x\rfloor & =2023 .
\end{aligned}
$$
(The symbol $\lfloor a\rfloor$ denotes the lower integer part of a real number a, i.e. the greatest integer not greater than a. E.g. $\lfloor 1,9\rfloor=1$ and $\lfloor-1,1\rfloor=-2$.) (Jaroslav Švrček)
Solution. Since $\lfloor y\rfloor$ and 2022 are integers, the equation $2 x+\lfloor y\rfloor=2022$ implies that $2 x$ is also an integer, so $\lfloor 2 x\rfloor=2 x$. Thus we can eliminate the unknown $x$ by subtracting the first equation of the system from the second one. We get
$$
3 y-\lfloor y\rfloor=1
$$
Thanks to (1), $3 y$ is an integer, so it has (according to its remainder after division by three) one of the forms $3 k, 3 k+1$ or $3 k+2$, where $k$ is an integer. From this it follows that either $y=k$, or $y=k+\frac{1}{3}$, or $y=k+\frac{2}{3}$, where $k=\lfloor y\rfloor$. We now discuss these three cases.
- In the case of $y=k,(1)$ becomes $3 k-k=1$ with the non-integer solution $k=\frac{1}{2}$.
- In the case of $y=k+\frac{1}{3}$, (1) is the equation $(3 k+1)-k=1$ with a solution $k=0$, which corresponds to $y=\frac{1}{3}$. The original system of equations is then apparently fulfilled, precisely when $2 x=2022$, i. e. $x=1011$.
- In the case of $y=k+\frac{2}{3}$, (1) is the equation $(3 k+2)-k=1$ with a non-integer solution $k=-\frac{1}{2}$.
Conclusion. The only solution of the given system is the pair $(x, y)=\left(1011, \frac{1}{3}\right)$.
REMARK. The equation (1) can also be solved in such a way that we write $y$ in the form $y=k+r$, where $k=\lfloor y\rfloor$ and the number $r \in\langle 0,1)$ is the so-called fractional part of $y$. Substituting into (1) we get the equation
$$
3(k+r)-k=1 \quad \text { i. e. } \quad 2 k=1-3 r \text {. }
$$
Since $2 k$ is an integer divisible by two and the number $1-3 r$ apparently lies in the interval $(-2,1)$, the equality of these numbers occurs in the only case when $2 k=1-3 r=0$, i.e. $k=0$ and $r=\frac{1}{3}$, i.e. $y=\frac{1}{3}$.
Another SOLUtion. The verbal definition attached to the problem formulation tells us that $\lfloor a\rfloor$ is an integer for which $\lfloor a\rfloor \leq a$ and at the same time $\lfloor a\rfloor+1>a$. So, estimates $a-1<\lfloor a\rfloor \leq a$ are valid for every real number $a$. According to them, we get from the first equation of the given system
$$
2022 \leq 2 x+y<2023 \text {. }
$$
Similarly, from the second equation follows
$$
2023 \leq 3 y+2 x<2024
$$
We can combine these inequalities in two ways. Combining the second part of (2) with the first part of (3) we obtain $2 x+y<2023 \leq 3 y+2 x$, whence from the comparison of the outermost expressions follows $y>0$. If we modify the first part of (2) to $2024 \leq 2 x+y+2$, then together with the second part of (3) we obtain $3 y+2 x<2024 \leq 2 x+y+2$. This time $y<1$ follows from the comparison of the outermost expressions.
Together, we got $0|A C|$ as in figure 2. Here $P$ and $Q$ denote the perpendicular projections of $S$ onto lines $A B$ and $A C$, respectively. Thanks to our assumption $|A B|>|A C|$ the point $P$ lies inside the segment $A B$, while the point $Q$ lies on the opposite ray to the ray $C A$. We prove that $P$ is the midpoint of $A C^{\prime}$.

Figure 2
From the cyclic quadrilateral $A B S C$ we have $|\angle S B P|=|\angle S B A|=180^{\circ}-|\angle S C A|=$ $|\angle S C Q|$, i.e. the marked angles $S B P$ and $S C Q$ are congruent. Thanks to the right angles
$B P S$ and $C Q S$, also the angles $P S B$ and $Q S C$ have the same size. In addition, we have $|P S|=|Q S|$, since $S$ lies on the angle bisector of $C^{\prime} A B^{\prime}$. We thus obtain that triangles $P B S$ and $Q C S$ are congruent according to condition $A S A$. Hence, equality $|B P|=|C Q|$ follows. Moreover, from the identical rectangular triangles $A S P$ and $A S Q$ we also have $|A P|=|A Q|$, so together it yields
$$
|A P|=|A Q|=|A C|+|C Q|=\left|C^{\prime} B\right|+|B P|=\left|C^{\prime} P\right| \text {. }
$$
Thus, $P$ is indeed the midpoint of $A C^{\prime}$, and the proof is complete.
AnothER SOLUTION (see fig. 3). This time we denote by $S$ the circumcenter of $A B^{\prime} C^{\prime}$ and we prove that points $A, B, S$, and $C$ lie on one circle. According to the introduction of the first solution, we know that $A B^{\prime} C^{\prime}$ is an isosceles triangle with base $B^{\prime} C^{\prime}$, hence its circumcenter $S$ lies on the angle bisector of $C^{\prime} A B^{\prime}$, that is $B A C$. The points $B$ and $C$ therefore lie in the opposite half-planes with the boundary line $A S$, therefore it is sufficient to verify $|\angle A B S|=180^{\circ}-|\angle A C S|$.

Figure 3
By equalities $\left|A C^{\prime}\right|=\left|A B^{\prime}\right|$ and $|A S|=\left|C^{\prime} S\right|=\left|B^{\prime} S\right|$, the triangles $C^{\prime} A S$ and $A B^{\prime} S$ are isosceles and congruent. Thus, if we rotate triangle $C^{\prime} A S$ around $S$ about the oriented angle $C^{\prime} S A$ we obtain triangle $A B^{\prime} S$. Since $B$ lies on $C^{\prime} A, C$ lies on $A B^{\prime}$ and at the same time $\left|C^{\prime} B\right|=|A C|$, this rotation maps $B$ onto $C$ and thus the angle $C^{\prime} B S$ to the angle $A C S$. Therefore, $\left|\angle C^{\prime} B S\right|=|\angle A C S|$, which already follows $|\angle A B S|=180^{\circ}-\left|\angle C^{\prime} B S\right|=180^{\circ}-|\angle A C S|$ as we promised to show.
3. For a given positive integer $n$, consider a rectangular game board $2 n \times 2$ and $2 n$ tokens numbered $1,2, \ldots, 2 n$ on it distributed as in the image on the left. In one turn, one can move one token from its field to an empty field adjacent by a side. Determine the minimal number of moves to pass from the original layout to the layout in the right picture.

(Josef Tkadlec)
Solution. We show that the smallest number of moves is $2 n^{2}+4 n-2$.
We distinguish horizontal moves and vertical moves - depending on whether the token is moved in a row or in a column. We estimate the number of horizontal and vertical moves separately.
Let us start with horizontal moves. Mark the columns as well as the tokens on the game board from left to right by the numbers 1 to $2 n$. Token 1 is at the beginning in column 1 and at the end should be in column $2 n$. Therefore we have to make at least $2 n-1$ moves to the right. In general, token $k$ should move from column $k$ to column $2 n+1-k$, and so in case $k \leq n$ it requires at least $2 n+1-2 k$ moves to the right, while in case $k>n$ at least $2 k-2 n-1$ moves to the left. Therefore, the total number of horizontal moves cannot be less than the sum
$$
\begin{gathered}
\underbrace{(2 n-1)+(2 n-3)+\ldots+1}_{\text {for tokens } 1 \text { to } n}+\underbrace{1+\ldots+(2 n-3)+(2 n-1)}_{\text {for tokens } n+1 \text { to } 2 n}= \\
=2(1+3+\ldots+(2 n-1))=2 n^{2} .
\end{gathered}
$$
Hence there are at least $2 n^{2}$ horizontal moves.
Now let us focus on vertical moves. We call the token lazy, if it stays in the bottom line all the time; let's call the other tokens active. Note that there can be at most one lazy token - at the end every two tokens are in the bottom row in the opposite order than they were at the beginning; if therefore both were lazy, they would sometimes have to lie on the same cell, which is not possible. So, there are at least $2 n-1$ active tokens and there were executed at least 2 vertical moves with each of them-first up and later down. There must therefore be at least $2 \cdot(2 n-1)=4 n-2$ vertical moves in total.
Together we get that we need at least $2 n^{2}+4 n-2$ moves. In the second part of the solution, we will show that this number of moves is sufficient.


Figure 1
One possible procedure for general $n$ is illustrated in the figure 1 for $n=4$. First, we move all $2 n$ tokens except the first one to the top row. Then we move token 1 from the first column to the last one (in the bottom row). Subsequently, we move tokens 2 to $n$ subsequently; each of them first to the bottom row and then to the right to the last free square (which is its target). Finally we move tokens $n+1$ to $2 n$ subsequently - each of them first to the left to its target column and then down to the bottom row.
In the procedure just described, the numbers of vertical and horizontal moves coincide with the estimates we derived in the first part of the solution: we made exactly $4 n-2$ vertical moves and we did not make more horizontal moves than necessary with any token. So the total number of moves in the described procedure is really $2 n^{2}+4 n-2$.
4. Given two odd positive integers $k$ and $n$. For each two positive integers $i, j$ satisfying $1 \leq i \leq k$ and $1 \leq j \leq n$ Martin wrote the fraction $i / j$ on the board. Determine the median of all these fractions, that is a real number $q$ such that if we order all the fractions on the board by their values from smallest to largest (fractions with the same value in any order), in the middle of this list will be a fraction with value $q$.
(Martin Melicher)
Solution. We show that the median has the value $q=\frac{k+1}{n+1}$. In the entire solution, $q$ denotes this number.
Since the given numbers $n$ and $k$ are odd, the fraction with value $q$ is actually written on the board-for example, it is a fraction $\frac{\frac{1}{2}(k+1)}{\frac{1}{2}(n+1)}$.
According to the comparison with the number $q$, we call a fraction $\triangleright$ small if its value is less than $q$,
$\triangleright$ mean if its value is equal to $q$,
$\triangleright$ large if its value is greater than $q$.
The number $k \cdot n$ of all fractions on the board is odd. To show that the middle fraction, when they are ordered by their values, has the value $q$, it is sufficient to prove that the number of small fractions is equal to the number of the large ones. (The latter will also mean that the number of mean fractions is odd, which again confirms their existence.)
We match the fractions written on the board-we couple each fraction $i / j$ with the fraction $i^{\prime} / j^{\prime}$ (and vice versa) if and only if $i^{\prime}=k+1-i$ and $j^{\prime}=n+1-j$, which can indeed be rewritten symmetrically as $i+i^{\prime}=k+1$ and $j+j^{\prime}=n+1$. Note that the inequalities $1 \leq i \leq k$ and $1 \leq j \leq n$ apparently hold if and only if $1 \leq i^{\prime} \leq k$ and $1 \leq j^{\prime} \leq n$.
It is obvious that only the fraction $\frac{\frac{1}{2}(k+1)}{\frac{1}{2}(n+1)}$ is „coupled" with itself and that all the other fractions are actually divided into pairs. If we show that every such pair either consists of one small and one large fraction, or of two mean fractions, we are done.
Thanks to the mentioned symmetry, it suffices to verify that a fraction $i^{\prime} / j^{\prime}$ is small if and only if the fraction $i / j$ is large. The verification is routine:
$$
\begin{aligned}
\frac{i^{\prime}}{j^{\prime}}<\frac{k+1}{n+1} & \Leftrightarrow \frac{k+1-i}{n+1-j}<\frac{k+1}{n+1} \Leftrightarrow(k+1-i)(n+1)<(k+1)(n+1-j) \Leftrightarrow \\
& \Leftrightarrow(k+1)(n+1)-i(n+1)<(k+1)(n+1)-(k+1) j \Leftrightarrow \\
& \Leftrightarrow i(n+1)>(k+1) j \Leftrightarrow \frac{i}{j}>\frac{k+1}{n+1} .
\end{aligned}
$$
This completes the solution.
## REMARKS.
1. Instead of adjusting the inequalities at the end of the solution, we could have made this consideration: Let us take $j$ fractions with value $i / j$ and $j^{\prime}$ fractions with value $i^{\prime} / j^{\prime}$ - in total it is $j+j^{\prime}$ fractions with the total sum $i+i^{\prime}$, so their arithmetic mean is $\left(i+i^{\prime}\right) /\left(j+j^{\prime}\right)=(k+1) /(n+1)=q$. However, since we averaged at most two different values, they either has a common value $q$ or one value less than $q$ and the other value larger than $q$.
2. A motivation for the chosen pairing of fractions $i / j$ and $i^{\prime} / j^{\prime}$ provides the following useful rule: For any quadruple of real numbers $a, b, c$, and $d$ with $b>0$ and $d>0$, the implication
$$
\frac{a}{b}<\frac{c}{d} \Rightarrow \frac{a}{b}<\frac{a+c}{b+d}<\frac{c}{d}
$$
holds. With the notation from our solution, we only need to distinguish which of the two fractions $i / j$ and $i^{\prime} / j^{\prime}$ has a smaller value, and apply this implication. We obtain that the fraction with smaller value is really small and the fraction with larger value is really large.
ANOTHER SOLUTION. Let us look at the problem geometrically - we consider the plane with the Cartesian coordinate system $O x y$. Each fraction $i / j$ that Martin wrote on the board is represented as a point $B$ with coordinates $[j, i] . *$ We thus get exactly those points $B[j, i]$ of our plane, for which $j \in\{1,2, \ldots, n\}$ and $i \in\{1,2, \ldots, k\}$. The set of these points (that we plotted in the figure for $n=11$ a $k=5$ ) we denote by $M$ and call it „the grid“. It has the shape of a rectangle with vertices $[1,1],[n, 1],[n, k]$ and $[1, k]$. Since numbers $n, k$ are odd, the center $S$ of this rectangle has integer coordinates $j_{0}=\frac{1}{2}(n+1)$ and $i_{0}=\frac{1}{2}(k+1)$. The center $S$ is thus itself a point of the grid $M$. Let us add that the line $O S$ has the slope $i_{0} / j_{0}$ and let us denote the value of this fraction by $q$ as in the first solution.
[^0]
Note that the grid $M$ is point symmetric with the center $S$ (in the picture we marked two points $B$ and $B^{\prime}$ where each of them is reflection of the other one).* Therefore, there is the same number of points from $M$ above and below the line $O S$. Let us clarify what distinguishes these two equally numerous groups of points „, below the line $O S^{\text {“ }}$ and „above the line $O S$ “.
The point $B[j, i]$ of the grid $M$ lies below the line $O S$ if and only if the line $O B$ has a smaller slope than the line $O S$, i.e. if $i / j|A C|$ looks analogously, the case $|A B|=|A C|$ is excluded by the specification-then points $K, L, O$ merge into one point.)

Figure 1[^1]
We have to prove that $H$ lies on the median from the vertex $A$ of triangle $A B C$. It is sufficient to show that triangles $A B H$ and $A C H$ have the same area.
Since $H L \perp O K \perp A B$ we have $H L \| A B$. Therefore $H$ and $L$ have the same distance from the line $A B$. However, it is equal to the length of the segment $L N$, since the point $L$ lies on the angle bisector of $C A B$ and $N$ is the perpendicular projection of $L$ onto $A C$. Hence, we get that the area of $A B H$ is equal to $\frac{1}{2}|A B| \cdot|L N|$. Analogously, we deduce that area of $A C H$ is equal to $\frac{1}{2}|A C| \cdot|K M|$. It remains to prove $|A B| \cdot|L N|=|A C| \cdot|K M|$.
For the points $K$ and $L$ lying on the angle bisector of $C A B$ we have $|\angle M A K|=$ $|\angle N A L|$. The rectangular triangles $A K M$ and $A L N$ are therefore similar, and therefore $|K M|:|A M|=|L N|:|A N|$. Hence with respect to $|A M|=\frac{1}{2}|A B|$ and $|A N|=\frac{1}{2}|A C|$ we get $|K M|:|A B|=|L N|:|A C|$, i.e. $|A B| \cdot|L N|=|A C| \cdot|K M|$ as we needed to prove.
Another sOLUtion. In addition to the points from the first solution, we also consider the intersection $E$ of lines $A B$ and $K H$ and intersection $F$ of lines $A C$ and $L H$. Again we observe that $K H \| A C$ and $L H \| A B$, so the quadrilateral $A E H F$ is a parallelogram (see fig. 2).

Figure 2
We use again similarity of triangles $A K M$ and $A N L$ and deduce $|K M|:|L N|=$ $|A M|:|A N|=|A B|:|A C|$. Equality of exterior angles at vertices $E, F$ of the parallelogram $A E H F$ yields $|\angle K E M|=|\angle L F N|$. Thus, the rectangular triangles $E K M$ and $F L N$ are also similar, whence it follows $|E M|:|F N|=|K M|:|L N|=|A B|:|A C|$. Hence,
$$
\frac{|A E|}{|A F|}=\frac{|A M|-|E M|}{|A N|-|F N|}=\frac{\frac{|A B|}{|A C|} \cdot|A N|-\frac{|A B|}{|A C|} \cdot|F N|}{|A N|-|F N|}=\frac{|A B|}{|A C|}
$$
and triangles $A E F$ and $A B C$ are similar by the $S A S$ condition (they coincide in the angle at the vertex $A$ and in the ratio of the adjacent sides). We thus obtain the decisive relation $E F \| B C$.
Since in the parallelogram $A E H F$ the line $A H$ bisects the diagonal $E F$, this line also bisects the segment $B C$, which is homothetic with $E F$ with center $A$. In other words, $H$ lies on the median from $A$ of the triangle $A B C$, as we had to prove.
Another solution. We consider points $K, L, M, N, O, H, E, F$ from the second solution. As there, we conclude that $A E H F$ is a parallelogram, and therefore the midpoint of the segment $E F$ lies on the ray $A H$. If we prove $E F \| B C$ then the midpoint $P$ of $B C$ also lies on the ray $A H$.

Figure 3
Due to the construction from the problem statement and the parallelogram $A E H F$, the six angles $K A E, K A F, K B A, L C A, A K E$ and $A L F$ marked in fig. 3 are congruent. According to the theorem $A A$, we have $\triangle A B K \sim \triangle A C L$ and $\triangle A K E \sim \triangle A L F$. According to the first similarity, $|A B|:|A C|=|A K|:|A L|$, and by the second similarity $|A K|:|A L|=|A E|:|A F|$. Together we get $|A B|:|A C|=|A E|:|A F|$, so by the $S A S$ theorem, $\triangle A E F \sim \triangle A B C$ holds, and hence $E F \| B C$, as we promised to prove.
REMARK. In all three solutions, we tacitly assumed that $H$ is an interior point of $A B C$. This follows from a consideration of the angles in the third solution according to which triangle $A E K$ has an obtuse interior angle at $E$, so $E$ lies inside the line segment $A M$. Similarly, $F$ lies inside the segment $A N$. Together, this already means that the vertex $H$ of the parallelogram $A E H F$ is indeed an interior point of triangle $A B C$-because it lies inside parallelogram $A M P N$.
6. Consider the sequence $\left(a_{n}\right)_{n=1}^{\infty}$ defined as follows:
$$
a_{1}=3 \quad a \quad a_{n}=a_{1} a_{2} a_{3} \ldots a_{n-1}-1 \text { for all } n \geq 2 \text {. }
$$
Prove that there exist
a) infinitely many primes dividing at least one member of this sequence;
b) infinitely many primes dividing no member of this sequence. (Martin Melicher)
Solution. a) By mathematical induction, we first prove that $a_{n} \geq 2$ for every $n$. For $n=1$ and $n=2$ this is true because $a_{1}=3$ and $a_{2}=2$. Now suppose that for some $n \geq 3$ the inequality $a_{k} \geq 2$ holds for every $k (December 6th, 2022)
$\mathbb{N} / \mathbb{C}^{\circ}$
1. In the domain of non-negative real numbers solve the system of equations
$$
\begin{aligned}
\lfloor 3 x+5 y+7 z\rfloor & =7 z, \\
\lfloor 3 y+5 z+7 x\rfloor & =7 x, \\
\lfloor 3 z+5 x+7 y\rfloor & =7 y .
\end{aligned}
$$
(Tomáš Bárta)
Solution. The first equation of the given system is fulfilled if and only if the following two conditions are satisfied:
$\triangleright$ the number $7 z$ is integer,
$\triangleright 7 z \leq 3 x+5 y+7 z<7 z+1$, i.e. $3 x+5 y \in\langle 0,1)$.
Similarly, the second and third equations are fulfilled if and only if the numbers $7 x$ and $7 y$ are integers and $3 y+5 z, 3 z+5 x \in\langle 0,1)$.
Now consider any triple of non-negative numbers $(x, y, z)$, which is the solution to the problem. The inequalities $z \geq 0$ and $3 z+5 x<1$ imply $5 x<1$, whence $7 x<\frac{7}{5}<2$. This means that non-negative integer $7 x$ is equal to one of the numbers 0 or 1 , i.e., $x \in\left\{0, \frac{1}{7}\right\}$. Similarly, $y, z \in\left\{0, \frac{1}{7}\right\}$.
At this point we have only $2^{3}=8$ triples $(x, y, z)$, which are candidates to solve the problem, so we could test them individually. However, this testing can be avoided by noting that if any two of the numbers $x, y, z$ were equal to $\frac{1}{7}$, one one of the expressions $3 x+5 y, 3 y+5 z, 3 z+5 x$ would be $\frac{8}{7}$, which is greater than 1 , and that is a contradiction. So, at most one of the numbers $x, y, z$ is equal to $\frac{1}{7}$ and the others are equal to zero. But then each of the three (non-negative) expressions $3 x+5 y, 3 y+5 z, 3 z+5 x$ is at most equal to $\frac{5}{7}$, so the conditions stated in the beginning of the solution as equivalence are satisfied and all such triples are solutions.
Conclusion. The problem has exactly 4 solutions
$$
(x, y, z) \in\left\{(0,0,0),\left(\frac{1}{7}, 0,0\right),\left(0,0, \frac{1}{7}, 0\right),\left(0,0, \frac{1}{7}\right)\right\} .
$$
2. In the convex pentagon $A B C D E|\angle C B A|=|\angle B A E|=|\angle A E D|$ holds. On the sides $A B$ and $A E$, there are points $P$ and $Q$, respectively such that $|A P|=$ $|B C|=|Q E|$ and $|A Q|=|B P|=|D E|$. Prove that $C D \| P Q$.
(Patrik Bak)
Solution. Since $|B C|=|A P|=|E Q|,|B P|=|A Q|=|E D|$ and $|\angle C B P|=$ $|\angle P A Q|=|\angle Q E D|$, the triangles $P B C, Q A P$ and $D E Q$ are congruent by the condition $S A S$.

Hence $|C P|=|P Q|=|Q D|$ and also
$$
|\angle C P Q|=180^{\circ}-|\angle B P C|-|\angle A P Q|=180^{\circ}-|\angle P Q A|-|\angle E Q D|=|\angle P Q D| \text {. }
$$
This means that by the condition $S A S$, the isosceles equilateral triangles $C P Q$ and $D Q P$ are also congruent. It follows that their altitudes from $C$ and $D$ to the common opposite side $P Q$ have the same lenghts, and hence $C D \| P Q$.
Remark. The observation that the triangles $C P Q$ and $D Q P$ are isosceles and congruent can also be obtained by reasoning that they are two (not colored above) corresponding parts of congruent quadrilaterals $Q A B C$ and $D E A P$. The congruence of these quadrilaterals is a consequence of congruences $\triangle Q A B \cong \triangle D E A$ and $\triangle A B C \cong$ $\triangle E A P$.
In the following solution, we specify that the congruence of quadrilaterals $Q A B C$ and $D E A P$ is a certain rotation. Thanks to this, we also complete the new solution differently (without using the altitudes of the congruent triangles).
Another solution. Let $S$ denote the circumcenter of $B A E$. Obviously, $|B A|=$ $|A E|$. Therefore, in the rotation with center $S$ by the oriented angle $B S A B \rightarrow A \rightarrow E$, and therefore $P \rightarrow Q$.

Another consequence of $B \rightarrow A \rightarrow E$ is the congruence of the four angles $S B A$, $S A B, S A E$ and $S E A$. It follows that the angle bisectors of congruent angles $C B A$, $B A E$ and $A E D$ are respectively the rays $B S, A S$ and $E S$. In our rotation is thus the image of the oriented angle $C B S$ the oriented angle $B A S$, so with respect to $|B C|=|A P|$, $C \rightarrow P$ holds. The same is true from the oriented angles $S A E$ and $S E D$, the equality $|A Q|=|E D|$ then leads to $Q \rightarrow D$. Together we have $C \rightarrow P \rightarrow Q \rightarrow D$, which implies
that the line segments $C D$ and $P Q$ have a common perpendicular bisector - the bisector of $C D$ bisects the angle $C S D$, and therefore bisects the angle $P S Q$, and therefore is also the perpendicular bisector of $P Q$. Because of the common bisector, the lines $C D$ and $P Q$ are parallel.
3. Prove the claim: If we choose any four factors of 720 , then one of them divides the product of the other three.
Solution. Given the decomposition $720=2^{4} \cdot 3^{2} \cdot 5$, the number 720 has exactly three prime factors: 2,3 and 5 . So, each of its factors is of the form $2^{\alpha} \cdot 3^{\beta} \cdot 5^{\gamma}$, where $\alpha$, $\beta, \gamma$ are non-negative integers (satisfying the inequalities $\alpha \leq 4, \beta \leq 2$ and $\gamma \leq 1$ which we will not need further). Surely also the product of any three factors of 720 is of the form $2^{\alpha} \cdot 3^{\beta} \cdot 5^{\gamma}$ with non-negative integers $\alpha, \beta$ and $\gamma$. Considering any two numbers of this form, the first is a quotient of the second if and only if the values $\alpha, \beta, \gamma$ of the first number do not exceed the corresponding values of the second number.
We prove the problem statement by contradiction. Let us admit that some four factors of the number 720 have the property that none of them divides the product of the other three factors. Then each of them contains in its prime decomposition some of the primes 2, 3, 5 to a higher power than it has in its decomposition the product of the other three factors, and therefore any one of them. But there are four divisors and only three prime numbers, and this is the contradiction.
ANOTHER SOLUTION. We present one of several possible variations of a direct proof. We use the observations contained in the first paragraph of the previous solution.
Let us choose any four factors of the number 720, call them Numbers. First, we choose three Numbers, that contain prime factor 2 in powers not exceeding that power of 2 in the fourth Number (if there are more than one such choice, we choose one of them). Then we select two of these three Numbers that contain prime factor 3 in powers, that do not exceed power of 3 of the third Number. Of these two Numbers, we finally select the one that contains the prime factor 5 in a power not exceeding power of 5 of the second Number. In the last selected number, each $p \in\{2,3,5\}$ has a power that does not exceed at least one of the powers of $p$ in the other three Number. This guarantees that the last selected Number has the property required by the problem statement.
## Czech statistics of the round
Number of participants 518. Each problem was worth 6 points. Average gains from the problems were successively $4.16,4.30,3.52$.
## Second Round of the 72nd Czech and Slovak Mathematical Olympiad
(January 10th, 2023)
$\mathbb{N} /$ [ூ
1. There are 8 white and 8 black chips on the $8 \times 5$ board as shown on the left picture. In one turn, one chip can be moved to an empty square adjacent by a side. Determine the smallest number of turns to pass from the original position to the one in the right picture.

(Josef Tkadlec)
Solution. In the first part, we prove that we always need at least 64 vertical turns and at least 8 horizontal turns, so at least $64+8=72$ turns in total.
Obviously, each of the 8 white chips must move at least four times downwards and each of the 8 black chips at least four times upwards. So in total, we have to do at least $8 \times 4+8 \times 4=64$ turns vertically.
In each column, there is one white chip at the beginning over one black chip, and the reverse is true at the end. So at least one of the two chips must leave its column in some turn, i.e. move horizontally. Since this is true for each of the 8 columns, we must indeed make at least 8 turns in the horizontal direction.
In the second part of the solution, we show that 72 turns are sufficient to accomplish the task. To do this, we divide the given game board $8 \times 5$ into 4 parts $2 \times 5$ and move the chips in each of them using the $2+5+4+5+2=18$ turns in the five stages shown in the diagram. The total number of turns is then actually $4 \cdot 18=72$.

Conclusion. The smallest possible number of turns is equal to 72.
REMARK. Let us divide the game board into four parts of $2 \times 5$. We prove that every solution of the given problem with 72 turns satisfies that no token leaves the part $2 \times 5$ in which it was originally located. Let us only consider the moves in the horizontal direction-call them $h$-moves.
Let us label the columns of the game plan 1 through 8 from left to right. Let $i \rightarrow i+1$ and $i \rightarrow i-1$ denote the $h$-move from column $i$. to the right and left, respectively. We are done with the promised proof when we show that the eight individual $h$-moves from each solution of 72 moves have (in some order) the form
$$
1 \rightarrow 2,2 \rightarrow 1,3 \rightarrow 4,4 \rightarrow 3, \ldots, 7 \rightarrow 8,8 \rightarrow 7
$$
Consider an arbitrary solution with 72 moves. Then for each column $i$ there is at least one $h$-move $i \rightarrow *$; because with solution of 72 moves, there are exactly eight $h$-moves, there is exactly one move $i \rightarrow *$ for each $i$. There is also exactly one move $* \rightarrow i$ for each $i$, since the number of moves from column $i$ must be equal to the number of moves to column $i$. For $i=1$ it is necessarily $1 \rightarrow 2$ and $2 \rightarrow 1$ turns, and thus for $i=3$ the turns $3 \rightarrow 4$ and $4 \rightarrow 3$, and so on up to $i=7$ the turns $7 \rightarrow 8$ and $8 \rightarrow 7$.
2. In the real numbers, solve the system of equations
$$
\begin{aligned}
& \sqrt{\sqrt{x}+2}=y-2 \\
& \sqrt{\sqrt{y}+2}=x-2
\end{aligned}
$$
(Radek Horenský)
Solution. Let $(x, y)$ be any solution of the given system. Since $\sqrt{\sqrt{x}+2}$ is obviously positive, we have $y>2$ by the first equation. Similarly, the second equation implies $x>2$.
Now we prove that the numbers $x$ and $y$ must be equal.* We will use the observation that the function square root is increasing. If $x>y$, then
$$
\sqrt{\sqrt{x}+2}>\sqrt{\sqrt{y}+2}
$$
i.e. $y-2>x-2, y>x$, and that is a contradiction. The case $x\sqrt{2}$. For each such $s$, we square the equality to obtain $s+2=\left(s^{2}-2\right)^{2}$, which we rewrite in the form $s^{4}-4 s^{2}-s+2=0$. Note that this equation has a root $s=2$. This is confirmed by the decomposition
$s^{4}-4 s^{2}-s+2=s^{2}\left(s^{2}-4\right)-(s-2)=s^{2}(s-2)(s+2)-(s-2)=(s-2)\left(s^{3}+2 s^{2}-1\right)$, by which we now show that $s=2$ is the only root of the derived equation, that satisfies our condition $s>\sqrt{2}$. Indeed, for every $s>\sqrt{2}, s^{3}+2 s^{2}-1>0$ (this is even true for $s \geq 1$ ). The only satisfactory value of $s=2$ corresponds to the only solution $x=s^{2}=4$ of the equation (1), and therefore to the only solution $x=y=4$ of the given problem.[^2]
Conclusion. The given system of equations has a unique solution $(x, y)=(4,4)$.
REMARK. Let us give a second possible derivation of $x=y$.
We begin the new proof of the equality $x=y$ by taking squares of both equations
$$
\begin{aligned}
& \sqrt{x}+2=(y-2)^{2}, \\
& \sqrt{y}+2=(x-2)^{2} .
\end{aligned}
$$
By subtracting the second equation from the first we get
$$
\begin{aligned}
\sqrt{x}-\sqrt{y} & =(y-2)^{2}-(x-2)^{2}=((y-2)-(x-2))((y-2)+(x-2))= \\
& =(y-x)(x+y-4)=(\sqrt{y}-\sqrt{x})(\sqrt{y}+\sqrt{x})(x+y-4) .
\end{aligned}
$$
Assuming that $x \neq y$, after dividing the two outer expressions by $\sqrt{y}-\sqrt{x} \neq 0$, we get
$$
-1=(\sqrt{y}+\sqrt{x})(x+y-4) .
$$
However, as we know, both $x$ and $y$ are greater than 2 , so the right-hand side of the last equation is positive, which is a contradiction.
ANOTHER SOLUtion. We again use the observation that both numbers $x$ and $y$ are greater than 2, and introduce the function $f:(2, \infty) \rightarrow(2, \infty), f(t)=\sqrt{t}+2$ for every $t>2$. The equations from the problem, rewritten in the form
$$
\begin{aligned}
& \sqrt{\sqrt{x}+2}+2=y \\
& \sqrt{\sqrt{y}+2}+2=x
\end{aligned}
$$
can then be written as a system of equations using the function $f$
$$
\begin{aligned}
& f(f(x))=y, \\
& f(f(y))=x .
\end{aligned}
$$
We see that its solutions are just pairs of the form $(x, y)=(x, f(f(x)))$, where the number $x$ satisfies the relation $f(f(f(f(x))))=x$. This is certainly satisfied in the case where $f(x)=x$. We show that the equality holds only in this case.
If $f(x)x$ we have*
$$
f(f(f(f(x))))>f(f(f(x)))>f(f(x))>f(x)>x .
$$
Thus, we have proved equivalence of $f(f(f(f(x))))=x$ and $f(x)=x$.
It remains to solve the equation $f(x)=x$ with unknown $x>2$, which is easy:
$$
f(x)=x \Leftrightarrow \sqrt{x}+2=x \Leftrightarrow 0=(\sqrt{x}-2)(\sqrt{x}+1) \Leftrightarrow \sqrt{x}=2 \Leftrightarrow x=4 \text {. }
$$
We arrive at the same conclusion as in the first solution.[^3]
REMARK. The reasoning about the function $f$ from the second solution can also be used to solve equation (1) from the first solution without considering the fourth degree equation. Indeed, the equation (1) can be written as the equation $f(f(x))=x$, which is, of course, equivalent to the simpler equation $f(x)=x$, due to the implications
$$
f(x)x \Rightarrow f(f(x))>f(x)>x
$$
which is justified in the same way as in the second solution. There we also solved the simplified equation $f(x)=x$.
3. In a convex quadrilateral $A B C D,|A B|=|B C|=|C D|$. Let furthermore, for the intersection $P$ of its diagonals $|\angle A P D|<90^{\circ}$. Let $R$ and $S$ be reflections of $A$ and $D$ with respect to $B D$ and $A C$, respectively. Prove that the lines $B C$ and $R S$ are parallel.
(Patrik Bak)
Solution. First we note that the given symmetries imply $|B R|=|B A|$ and $|C S|=|C D|$. Hence,
$$
|A B|=|B C|=|C D|=|B R|=|C S| \text {. }
$$
By construction, the points $R, S$ are obviously different and the midpoint $X$ of the segment $A R$ lies on its perpendicular bisector $B D$ and the midpoint $Y$ of the segment $D S$ lies on its perpendicular bisector $A C$. In the following paragraph we prove that $R$ lies inside the angle $A B C$ and $S$ inside the angle $D C B$, as in our figure. Together, this means that points $A, D, R, S$ lie inside the same half-plane with the boundary line $B C$.

The assumption $|\angle A P D|<90^{\circ}$ implies $|\angle A P B|>90^{\circ}$, which for the interior point $P$ of the base $A C$ of the isosceles triangle $A B C$ means that $|\angle A B P|<\frac{1}{2} \cdot|\angle A B C|$; hence $|\angle A B R|=2 \cdot|\angle A B P|<|\angle A B C|$, hence the point $R$ is actually inside the angle $A B C$. Analogously from the inequality $|\angle D P C|>90^{\circ}$ for the interior point $P$ of the base $B D$ of isosceles triangle $D C B$, we conclude that the point $S$ actually lies inside the angle $D C B$.
A further consequence of the inequality $|\angle A P D|<90^{\circ}$ is that for the marked interior angles of the right triangles $A P X$ and $D P Y|\angle X A P|=90^{\circ}-|\angle A P D|=|\angle Y D P|$, i.e. $|\angle R A C|=|\angle S D B|$.
Let us return to the equalities (1). According to these, the point $B$ is the circumcenter of the triangle $A R C$, which evidently lies in the angle $A B C$. Therefore, according to the inscribed angle theorem $|\angle R B C|=2 \cdot|\angle R A C|$. By a similar reasoning about the circumcenter $C$ of the triangle $B S D$ in the angle $B C D$ we obtain $|\angle S C B|=2 \cdot|\angle S D B|$.
From the last two paragraphs we get the equality $|\angle R B C|=|\angle S C B|$. This, together with (1), leads to the conclusion that (isosceles) triangles $R B C$ and $S C B$ are congruent by the $S A S$ theorem. Hence, their altitudes from the vertices of $R$ and $S$ to the side $B C$ have the same length. This already implies that $B C \| R S .^{*}$
Another solution. We show that the points $R$ and $S$ lie on the circumcircle of $B C P$. We write the detailed proof only for the point $R$, for the point $S$ the proof is analogous.
As in the first solution, we derive (1) and observe that $R$ lies inside the angle $A B C$. From the condition $|\angle A P D|<90^{\circ}$ it also follows that $R$ lies in the half plane $A C D$.
According to (1), $B$ is the circumcenter of $A R C$, whose central angle $R B A$ with the bisector $B D$ is therefore twice the angle $R C A$. Therefore the three angles $P B A, R B P$ and $R C P$ marked in the figure are congruent. Congruence of the last two angles with respect to the previous paragraph already means that the point $R$ does indeed lie on the circumcircle of $B C P$. For the point $S$ the same is true due to the analogous congruence of the angles $P C D, S C P$ and $S B P$.

It follows from the proof that the points $B, C, R, S$ lie on one circle, while the points $R$ and $S$ lie in the same half-plane with the boundary line $B C$. Hence the congruence of the angles $B R C$ and $B S C$, which, together with the equality $|B C|=|B R|=|C S|$, means that the isosceles triangles $R B C$ and $S C B$ are congruent. The congruence of their altitudes proves the relation $B C \| R S$.[^4]
4. Find all triples of positive integers $a, b, c$ for which the product
$$
(a+b)(b+c)(c+a)(a+b+c+2036)
$$
is equal to the power of a prime number with an integer exponent.
Solution. First, let us note that at least one of the numbers $a+b, a+c$ and $b+c$ must be even. Indeed, two of the three numbers $a, b, c$ have the same parity, so their sum is even.
If the product we investigate is a power of a prime $p$, then each of the four factors must be a power of $p$. As we already know, one of the first three factors is even, so $p=2$. Each of the four factors is therefore a power of two, which is greater than $1=2^{0}$, since the numbers $a, b, c$ are positive integers. Hence, each factor is an even number.
Further observe that the numbers $a+b, a+c, b+c$ are all even numbers, if and only if the numbers $a, b, c$ all have the same parity. Since $a+b+c+2036$ is even, $a, b$ and $c$ must be even numbers. Therefore, we can write $a=2 a_{1}, b=2 b_{1}$, and $c=2 c_{1}$, where $a_{1}$, $b_{1}, c_{1}$ are positive integers. Then of course
$$
(a+b)(a+c)(b+c)(a+b+c+2036)=2^{4}\left(a_{1}+b_{1}\right)\left(a_{1}+c_{1}\right)\left(b_{1}+c_{1}\right)\left(a_{1}+b_{1}+c_{1}+1018\right) .
$$
The product of the last four parentheses must be a power of two. The numbers $a_{1}, b_{1}, c_{1}$ are therefore solutions to the original problem with the constant 2036 replaced by 1018 . For the same reason as above $a_{1}, b_{1}$, and $c_{1}$ must be even. We denote by $a_{2}, b_{2}$ and $c_{2}$ respectively their halves (they are again positive integers) and we get
$(a+b)(a+c)(b+c)(a+b+c+2036)=2^{8}\left(a_{2}+b_{2}\right)\left(a_{2}+c_{2}\right)\left(b_{2}+c_{2}\right)\left(a_{2}+b_{2}+c_{2}+509\right)$.
And again, we have the same problem with the constant 509, so the numbers $a_{2}, b_{2}$, and $c_{2}$ necessarily have the same parity. However, since the number 509 is odd, $a_{2}, b_{2}$ and $c_{2}$ must be odd numbers. We see that the triple $a_{2}=b_{2}=c_{2}=1$ satisfies the problem (since $3+509=512$ is a power of two), so the corresponding triple $a=b=c=4$ is a solution to the original problem. We show that it is the only solution.
Suppose that at least one of the numbers $a_{2}, b_{2}, c_{2}$ is greater than one, let it be $c_{2}$ without loss of generality. Then, of course, the power of two equal to $a_{2}+c_{2}$ is greater than 2, so it is divisible by four. This means that dividing by four one of the numbers $a_{2}, c_{2}$ gives a remainder of 1 and the other a remainder of 3 . So the third odd number $b_{2}$ has the same remainder when divided by four as one of the numbers $a_{2}, c_{2}$. The sum of $b_{2}$ with this number then has a remainder of 2 , and since this sum is also a power of two, it must be the power of $2^{1}$. It follows that $b_{2}=1$ and $a_{2}=1$ (the equality of $c_{2}=1$ is ruled out by our assumption $c_{2}>1$ ). Thus the remainder 3 when divided by four necessarily gives $c_{2}$. But then the number $a_{2}+b_{2}+c_{2}+509$ gives remainder 2 , so it is not a power of two, and that is a contradiction.
Conclusion. A single triple $(a, b, c)=(4,4,4)$ satisfies the problem statement.
ANOTHER SOLUtion. Let $a \geq b \geq c$ hold without loss of generality, so then $a+b \geq c+a \geq b+c \geq 2$. The product $(a+b)(b+c)(c+a)(a+b+c+2036)$ is a power of some prime number if and only if powers of that prime are all four factors of $a+b, b+c, c+a$, and $a+b+c+2036$. So let $a+b=p^{k}, c+a=p^{l}$, and $b+c=p^{m}$ for some prime $p$ and non-negative integers $k, l$ and $m$. For these, by the theorem of the introduction $k \geq l \geq m \geq 1$.
If $k>l$, and hence $k-1 \geq l$ and $k-1 \geq m$, with respect to $p \geq 2$, we would have
$$
a+b=p^{k} \geq p^{k-1}+p^{k-1} \geq p^{l}+p^{m}=(c+a)+(b+c)>a+b,
$$
which is impossible. Necessarily, then, $k=l$, so $a+b=p^{k}=p^{l}=c+a$, where $b=c$. Then of course $p^{m}=b+c=2 b$, and so $b=c=p^{m} / 2$, so $2 \mid p$, e.g. $p=2$, and therefore $b=c=2^{m-1}$ and $a+b=2^{k}$. Since $p=2$, it is also $a+b+c+2036=2^{n}$ for some integer $n$, which obviously satisfies the condition $2^{n}>2036$.
By the conclusion of the previous paragraph, the numbers $k, m, n$ satisfy the equality
$$
2^{n}=(a+b)+c+2036=2^{k}+2^{m-1}+2036 .
$$
Note that dividing by 16 number 2036 gives the remainder of 4 , while $2^{n}$ certainly gives a remainder of 0 if $2^{n}>2036$.* This implies $2^{k}+2^{m-1} \equiv 12(\bmod 16)$. The summands $2^{k}$ and $2^{m-1}$ - as powers of two - are congruent to $1,2,4,8$ or $0 \quad(\bmod 16)$. It is easy to see that the derived congruence holds only if one of the powers of $2^{k}, 2^{m-1}$ yields a residue of 4 and the other 8 . Then $k, m-1=2,3$. However, since $2^{m-1}=b (March 20-21, 2023)

1. Alice and Ben play the game on a board with 72 cells around a circle. First, Ben chooses some cells and places one chip on each of them. Each round, Alice first chooses one empty cell and then Ben moves a chip from one of the adjacent cell onto the chosen one. If Ben fails to do so, the game ends; otherwise, another round follows. Determine the smallest number of chips for which Ben can guarantee that the game will last for at least 2023 rounds.
(Václav Blažej)
Solution. We show that the smallest possible number of chips is 36 .
In the first part, we describe the strategy of Ben in which he can ensure that the game will never end. At the beginning, Ben places 36 chips on even cells of the game board and the odd cells he lets empty. Moreover, he firmly divides all 72 cells into 36 pairs of adjacent cells. Then, Ben is moving the chips in such a way that each of these pairs of cells contains exactly one chip throughout the whole game: in each round, Alice chooses an empty cell, and Ben then moves the chip from the second cell of the pair. So the game never ends.
In the second part of the solution, we assume that Ben initially places fewer than 36 chips on the board. We describe Alice's strategy for ensuring that the game ends no later than in the 36th round.
First, Alice imagines that the cells are colored alternately white and black. In each round, Alice chooses an empty white cell - she always finds one, because there are 36 white cells, while the chips are fewer. So, Ben will be forced to move a token from one of the black cell to the white cell. Then, each chip will be moved at most once during the course of the game. The game will therefore end no later than in the 36th round.
Another solution. We present a different approach to the second part of the original solution. We again assume that Ben places less than 36 chips on the board, and, in addition, that no three adjacent cells are empty - otherwise Alice ends the game in the first round by choosing the middle of those three cells. We show that after at most 34 rounds, Alice can force a situation where three empty adjacent cells exist.*
The empty cells are then divided into several continuous sections, each consisting of one or two cells. There are at least two sections consisting of two cells - dividing all 72 cells into 36 pairs of adjacent cells, at least one pair remains empty; then we use the second possible pairing and find another empty pair.
Alice places a marker between each two empty adjacent cells and she corrects the position of one marker after each round. At the beginning these $z \geq 2$ markers divide[^6]all 72 cells into $z$ sections. Each of them contains at least 3 cells, it starts and ends with an empty cell and does not contain two adjacent empty cells. Alice can certainly select from these segments one, let's call it $U$, that has fewer chips than empty cells (since this inequality holds for their total numbers).
Let $k \geq 1$ be such that the selected segment $U$ contains $k+1$ empty cells and at most $k$ chips. However, these chips must be exactly $k$, since any two consecutive empty cells must be separated by a cell with a chip. Thus, the section $U$ consists of $2 k+1$ cells for which and $2 k+1 \leq 72-3=69$, i.e. $k \leq 34$. In the obvious marking, then, the situation in the $U$ segment looks like this:
$$
\ldots 0|\underbrace{0101 \ldots 010}_{U}| 0 \ldots
$$
Alice chooses the first empty cell from the left in the $U$ segment in the first round. Ben is then forced to move the chip from the right. This makes the left marker move two positions to the right, creating a new $U^{\prime}$ section of length $2 k-1$ :
$$
\ldots 0|\underbrace{0101 \ldots 010}_{U}| 0 \ldots \rightarrow \ldots 010|\underbrace{0101 \ldots 010}_{U^{\prime}}| 0 \ldots
$$
In the second round, Alice again selects the first cell from the left in the $U^{\prime}$ section. She repeats the procedure over and over again until after the $k$-th round (where, as we know $k \leq 34$ ), she gets the section between two markers consisting of a single cell, i.e. there are three adjacent empty cells. Then she brings the game to an end in the next turn.
REMARK. It can be proved that there must be at least two segments of odd length. Alice can then choose the segment $U$ from the previous solution so that it consists of at most 35 cells. In addition, Alice can modify her strategy so that in the segment $U$ she points not to the outside cell but to the middle empty cell, or to one of the cells next to the middle occupied cell. Then, after Ben's move, a new marker will appear in $U$ that splits $U$ into two sections and Alice then selects the shorter of them. Repeating this procedure gives Alice a sequence of sections with number of cells that does not exceed $35,17,7,3$, and 1, respectively, so Alice ends the game no later than in the fifth round.
2. Let $n \geq 3$ be an integer and $a_{1}, a_{2}, \ldots, a_{n}$ be the lengths of the sides of an $n$-gon. Prove the inequality
$$
a_{1}+a_{2}+\ldots+a_{n}>\sqrt{2\left(a_{1}^{2}+a_{2}^{2}+\ldots+a_{n}^{2}\right)}
$$
(Jaroslav Švrček)
Solution. Since $a_{1}, \ldots, a_{n}$ are the lengths of the sides of an $n$-gon, the following inequalities obviously hold
$$
\begin{gathered}
a_{2}+a_{3}+\ldots+a_{n}>a_{1}, \\
a_{1}+a_{3}+\ldots+a_{n}>a_{2}, \\
\vdots \\
a_{1}+a_{2}+\ldots+a_{n-1}>a_{n} .
\end{gathered}
$$
In the first inequality, we add $a_{1}$ to both sides and then we multiply both sides by the positive number $a_{1}$. Similarly, in the second inequality, we add $a_{2}$ to both sides and multiply them both by $a_{2}$ and so on. This yields the inequalities
$$
\begin{gathered}
a_{1}\left(a_{1}+a_{2}+\ldots+a_{n}\right)>2 a_{1}^{2}, \\
a_{2}\left(a_{1}+a_{2}+\ldots+a_{n}\right)>2 a_{2}^{2}, \\
\vdots \\
a_{n}\left(a_{1}+a_{2}+\ldots+a_{n}\right)>2 a_{n}^{2} .
\end{gathered}
$$
If we sum up all these inequalities, we get
$$
\left(a_{1}+a_{2}+\ldots+a_{n}\right)\left(a_{1}+a_{2}+\ldots+a_{n}\right)>2\left(a_{1}^{2}+a_{2}^{2}+\ldots+a_{n}^{2}\right) .
$$
After taking square roots of the two (positive) sides of the last inequality we get the inequality we were supposed to prove.
ANOTHER SOLUTION. We are able to assume without loss of generality $a_{n} \geq$ $\max \left\{a_{1}, a_{2}, \ldots, a_{n-1}\right\}$. From $a_{1}+a_{2}+\ldots+a_{n-1}>a_{n}$ we get
$$
\begin{aligned}
a_{1}+a_{2}+\ldots+a_{n} & =\sqrt{\left(\left(a_{1}+a_{2}+\ldots+a_{n-1}\right)+a_{n}\right)\left(a_{1}+a_{2}+\ldots+a_{n}\right)}> \\
& >\sqrt{\left(a_{n}+a_{n}\right)\left(a_{1}+a_{2}+\ldots+a_{n}\right)}= \\
& =\sqrt{2 a_{n} a_{1}+2 a_{n} a_{2}+\ldots+2 a_{n} a_{n}} \geq \\
& \geq \sqrt{2 a_{1}^{2}+2 a_{2}^{2}+\ldots+2 a_{n}^{2}} .
\end{aligned}
$$
In the last step we have used the fact that $2 a_{n} a_{i} \geq 2 a_{i}^{2}$ for every $i \in\{1,2, \ldots, n\}$ due to our assumption $a_{n} \geq a_{i}>0$. This proves the strict inequality from the problem statement.
3. In an acute-angled triangle $A B C$, let us denote $H$ its ortocenter and $I$ its incentre. Let $D$ be the perpendicular projection of $I$ on the line $B C$, and $E$ be the image of point $A$ in symmetry with center $I$. Furthermore, $F$ is the perpendicular projection of the point $H$ on the line ED. Prove that the points B, H, F and $C$ lie on one circle.
(Patrik Bak)
Solution. Consider point $P$ such that $A B P C$ is a parallelogram (see figure). Since $H B \perp A C \| B P$, the angle $H B P$ is right. Similarly it follows from $H C \perp A B \| C P$ that the angle $H C P$ is also right. Therefore, both points $B$ and $C$ lie on the Thales circle with a diameter $H P$.
Surely it is sufficient to consider only the case where $H \neq F$. We explain why it is then sufficient to show, that the points $D, E, P$ are collinear. For then the point $F$ lies on this line, so that the angle $H F P$ is right, and therefore its vertex $F$ lies (together with the points $B, C$ and $H$ ) on the circle with the diameter $H P$.
Let $M$ be the midpoint of $B C$. In point reflection with the centre $M$, denote $L$ the image of $D$ and $J$ the image of $I$. It follows from this symmetry, that $J$ is the incenter of triangle $B C P$ and $L$ is the point where this incircle touches $B C$. Let $K L$ be the diameter of this incircle. Thus, $J$ is the midpoint of the segment $K L$.

It is well known that $D$ is the tangent point of the excircle of triangle $B C P$. This excircle is the image of the incircle in homotety with center $P$ (and with a coefficient greater than 1). In this homothety is the tangent $B C$ of the excircle the image of the tangent of the incircle, that is parallel to their common tangent $B C$ but has smaller distance from $P$. This tangent, however, passes through the point $K$, since $K L$ is the diameter of the incircle perpendicular to both tangents. Therefore, the homothety maps the point $K$ to the point $D$, and thus the points $D, K, P$ lie on the same line. This remains to prove that point $E$ also lies on this line. To do this, it suffices to show that the lines $E P$ and $D K$ are parallel. These are, however, the sides of triangles $A E P$ and $L D K$ with the meanlines $I M$ and $M J$ respectively for which $I M \| E P$ and $M J \| D K$; hence the desired relation $E P \| D K$ follows, since $M$ is the midpoint of the line segment $I J$.
4. Consider a sequence $\left(a_{n}\right)_{n=1}^{\infty}$ of positive integers satisfying for each $n \geq 3$ the condition
$$
a_{n}=a_{1} a_{2}+a_{2} a_{3}+\ldots+a_{n-2} a_{n-1}-1
$$
a) Prove that some prime number is a divisor of infinitely many terms of this sequence.
b) Prove that there are infinitely many such prime numbers.
(Tomáš Bárta)
Solution. Since all terms $a_{i}$ are positive integers, we have
$$
a_{5}=a_{1} a_{2}+a_{2} a_{3}+a_{3} a_{4}-1 \geq 1+1+1-1=2 \text {, and therefore } a_{5} \neq 1 \text {. }
$$
The number $a_{5}$ is thus divisible by at least one prime number.
For every $n \geq 4$, the following holds
$$
\begin{aligned}
a_{n} & =\left(a_{1} a_{2}+a_{2} a_{3}+\ldots+a_{n-3} a_{n-2}\right)+a_{n-2} a_{n-1}-1= \\
& =\left(a_{n-1}+1\right)+a_{n-2} a_{n-1}-1= \\
& =a_{n-1}\left(a_{n-2}+1\right),
\end{aligned}
$$
and therefore $a_{n-1} \mid a_{n}$. Let $p$ be any prime divisor of $a_{5}$, then the relation $a_{n-1} \mid a_{n}$ implies $p \mid a_{6}$, from where $p \mid a_{7}$, and so on. By mathematical induction we get $p \mid a_{n}$ for every $n \geq 5$. Thus, the prime $p$ divides infinitely many terms of the given sequence. This completes the proof of part a).
Let $\mathcal{P}$ denote the set of all primes that divide infinitely many terms of the sequence. Suppose that the set $\mathcal{P}$ is finite, i.e. $\mathcal{P}=\left\{p_{1}, \ldots, p_{k}\right\}$ for a suitable $k$. Obviously, for every $i \in\{1,2, \ldots, k\}$ we find such a term $a_{n_{i}}$ that is divisible by $p_{i}$ and $n_{i} \geq 5$. Due to the relation $a_{n-1} \mid a_{n}$ (proved earlier for each $n \geq 4$ ) we have $p_{i} \mid a_{n}$ for all $n \geq n_{i}$. If we now denote $N=\max \left(n_{1}, \ldots, n_{k}\right)$, then $a_{N}$ is divisible by all primes $p_{1}, \ldots, p_{k}$. Therefore, $a_{N}+1>1$ is not divisible by any primes from $\mathcal{P}$, so there must be a prime $q \notin \mathcal{P}$ satisfying $q \mid a_{N}+1$. This prime $q$ is then also a divisor of the number $a_{N+2}=a_{N+1}\left(a_{N}+1\right)$, so $q \mid a_{n}$ holds for each $n \geq N+2$, and therefore $q \in \mathcal{P}$. Thus, we get a contradiction, that proves the statement in part b).
REmark. From solving part a), we know that every prime number that divides one member of the sequence starting with the third one, divides all the following members. So it is enough to prove that there are infinitely many primes that divide at least one member of a given sequence. This observation is a consequence of a stronger claim, namely that for every $n \geq 1$ is number $a_{2 n+3}$ divisible by at least $n$ different primes. Proof of this statement will not be given here.
5. In the triangle $A B C$, let us denote $M, N, P$ the midpoints of the sides $B C, C A, A B$ respectively and let $G$ be the centroid of $A B C$. Let the circumcircle of $B G P$ intersects the line MP at a point $K$ different from $P$, and let the circumcircle of $C G N$ intersects the line $M N$ at a point $L$ different from $N$. Prove $|\angle B A K|=|\angle C A L|$.
(Josef Tkadlec)
Solution. Obviously, $M P$ intersects the median $B N$ between points $B$ and $G$, so the point $K$ lies on the ray $P M$ and $B K G P$ is cyclic. Similarly, the point $L$ lies on the ray $N M$ and $C L G N$ is cyclic. Due to $M P \| C A$ and $M N \| B A$ we have
$$
|\angle B P K|=|\angle B P M|=|\angle B A C|=|\angle M N C|=|\angle L N C| \text {, }
$$
while the two cyclic quadrilaterals imply
$$
|\angle B K P|=|\angle B G P|=|\angle N G C|=|\angle N L C| \text {. }
$$

We see that triangles $B P K$ and $C N L$ are similar according to the condition $A A$. By the condition $S A S$ also triangles $A B K$ and $A C L$ are similar since
$$
\begin{aligned}
& \text { (i) }|\angle A B K|=|\angle P B K|=|\angle N C L|=|\angle A C L| \text {, } \\
& \text { (ii) } \frac{|A B|}{|B K|}=2 \cdot \frac{|P B|}{|B K|}=2 \cdot \frac{|N C|}{|C L|}=\frac{|A C|}{|C L|} \text {. }
\end{aligned}
$$
Thus, the equality $|\angle B A K|=|\angle C A L|$ is proved.
6. Let $n \geq 3$ be an integer. Consider a grid consisting of $n \times n$ squares, whose individual squares can be either white or black. In each step, we change the colours of the five squares that make up the pattern

in any rotation. At the beginning, all squares are white. Decide for which $n$ the squares can be made all black after a finite number of steps. (Jaroslav Zhouf)
Solution. Let us call the individual squares of the grid hereafter fields. We prove that recoloring* of all $n^{2}$ white fields in finitely many steps is possible if and only if $n>3$ and $n$ is divisible by two or three.
Let us first show that for $n=3$ the desired recoloring does not exist. Let us consider the three fields A, B, C as shown in Figure 1.
| | $\mathrm{B}$ | |
| :--- | :--- | :--- |
| | $\mathrm{A}$ | $\mathrm{C}$ |
| | | |
Figure 1
Let us note that in each step, the field A is recolored and exactly one of the fields B or $\mathrm{C}$ is recolored. If after a certain number of steps all 9 fields are black, the number of recolorings of $\mathrm{B}$ and $\mathrm{C}$ would be odd, so the number of recolorings of $\mathrm{A}$ would be even, and therefore, the field A would be white in the end, which is a contradiction. Henceforth, we will assume that $n \geq 4$. We prove the assertion from the introductory paragraph of the solution in three steps.
(i) If $n$ is even, we use the procedure of Figure 2 repeatedly, in which we in four steps change colors of exactly 4 fields in a $4 \times 4$ square. We divide the $n \times n$ grid into $\left(\frac{1}{2} n\right)^{2}$ squares $2 \times 2$ and change color in each square by the above procedure. For those squares that are on the border of the grid, we rotate Fig. 2 appropriately to make the corresponding $4 \times 4$ square lie entirely inside the grid.[^7]

Figure 2
(ii) If $n$ is divisible by three, we repeatedly use the procedure on Figure 3, which first uses the construction 2 twice. In this way, we change colors of 9 fields forming a $3 \times 3$ square that lies in a $4 \times 5$ rectangle (see the purple bordered area). Similarly to part (i) we apply this procedure to the individual $3 \times 3$ squares and for the boundary squares, we again rotate the situation on the figure 3 appropriately, so that the required $4 \times 5$ rectangle lies entirely inside the grid.

Figure 3
(iii) We now assume that $n$ is not divisible by two, or three. The fields in each line we denote by numbers $0,1,2,0, \ldots$ as in the figure 4 .
| 0 | 1 | 2 | 0 | 1 | $\cdots$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| 0 | 1 | 2 | 0 | 1 | $\cdots$ |
| 0 | 1 | 2 | 0 | 1 | $\cdots$ |
| 0 | 1 | 2 | 0 | 1 | $\cdots$ |
| 0 | 1 | 2 | 0 | 1 | $\cdots$ |
| $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | $\vdots$ | |
Figure 4
Let $a_{i}$ denote the number of black fields with the number $i, i \in\{0,1,2\}$. Note that parity of each of the three numbers $a_{i}$ changes in each step, since we change the color in some of the fields in only three adjacent columns, and in each of them we change the colour of an odd number of cells. Since at the beginning we have $a_{0}=a_{1}=a_{2}=0$, after any number of steps, $a_{0} \equiv a_{1} \equiv a_{2} \quad(\bmod 2)$.
By assumption $3 \nmid n$, so number of squares with number 0 is by $n$ (one whole column) larger than number of those with number 2. If after several steps all the boxes were colored black, we would have $a_{0}-a_{2}=n$, which due to $2 \nmid n$ would mean that the numbers $a_{0}$ and $a_{2}$ have different parity. But this contradicts the conclusion of the previous paragraph.
## Czech statistics of the round
Number of participants 43. Each problem was worth 7 points. Average gains from the problems were successively $4.86,4.77,0.37,6.14,3.53,1.02$.
[^0]: * Due to this change of order of the numbers $i$ and $j$ the value of the considered fraction $i / j$ equals the slope of the straight line that connects the origin $O[0,0]$ with the point $B[j, i]$.
[^1]: * Although this statement can be considered obvious we come back to it in the note after the solution.
[^2]: * Let us emphasize that the equality $x=y$ does not follow from the mere symmetry of the system.
[^3]: * To the above quadruple of inequalities, let us add that the case $f(x)4$ and the case $f(x)>x$ occurs for every $x \in(2,4)$. This follows obviously from the decomposition of $f(x)-x=(2-\sqrt{x})(\sqrt{x}+1)$, which we will also use in solving the equation $f(x)=x$.
[^4]: * Instead of consideration of the congruent triangles $C B R$ and $B C S$, it suffices to state, that the congruent segments $B R$ and $C S$ are symmetrically clustered along the axis of the line segment $B C$.
[^5]: * Where the idea of studying divisibility by 16 comes from is explained in the remark after this solution.
[^6]: * In the remark after this solution we outline how Alice can further refine this strategy to end the game even sooner, if necessary.
[^7]: * We will thus furthermore preferably to mean both changing the color of a square from white to black and vice versa.