61st Czech and Slovak
Mathematical Olympiad
Edited by
Karel Horák
Translated into English by
Martin Panák
First Round of the 61st Czech and Slovak Mathematical Olympiad Problems for the take-home part (October 2011)

1. Let $n$ be the sum of all ten-digit numbers, which contain every decimal digit from zero to nine. Determine the remainder of $n$ when divided by 77 .
(Pavel Novotný)
Solution. We determine the value of $n$ first. We count for each non-zero digit the number of its occurrences in the summands (giving $n$ altogether) in the place of units, tens, hundreds, ... This enables us to evaluate the "contribution" of each digit to the sum, and thus $n$ itself. Every digit is on each of the places $9 !-8$ ! times (we have to subtract the "numbers" starting with zero) except for the first place, where it is 9 ! times (we do not have to subtract anything). In total we get
$$
\begin{aligned}
n & =(1+2+\cdots+9)(9 !-8 !)\left(10^{8}+10^{7}+\cdots+10+1\right)+(1+2+\cdots+9) \cdot 9 ! \cdot 10^{9} \\
& =45\left(8 \cdot 8 ! \cdot 111111111+9 \cdot 8 ! \cdot 10^{9}\right)=45 \cdot 8 ! \cdot 9888888888 .
\end{aligned}
$$
Thus $n$ is divisible by 7 and by the criterion of divisibility by 11 is
$$
9888888888 \equiv 8-8+8-8+\cdots+8-9 \equiv-1 \quad(\bmod 11)
$$
Further $8 ! \equiv 5(\bmod 11)$. In total
$$
n \equiv 45 \cdot 8 ! \cdot 9888888888 \equiv 1 \cdot 5 \cdot 10 \equiv 6 \quad(\bmod 11) .
$$
Finally $n \equiv 28(\bmod 77)$.
2. There are several people on a party. Every two persons, which do not know each other, have exactly two common friends. $A$ and $B$ know each other but do not have any common friend. Show that $A$ and $B$ have the same number of friends at the party. Show that it could be exactly six persons on the party. (As usual the relation of friendship is symmetric, and "know someone" = "be friend with".)
(Vojtech Bálint)
Solution. Let $M_{A}$ be the set of friends of $A, M_{B}$ the set of friends of $B$ (Fig. 1). We

Fig. 1
show $\left|M_{A}\right| \geqslant\left|M_{B}\right|$. No person from $M_{A}$ knows $B$ (otherwise $A$ and $B$ would have common friend). That is everyone from $M_{A}$, let's say $X$, has two common friends with $B$. One of them is $A$ and the other one has to be from $M_{B}$ (it is the set of all $B$ 's friends), let us call him (her) $X_{B}$. Then for any $X, Y \in M_{A}$ we have $X_{B} \neq Y_{B}$ (otherwise $X, Y$, and $B$ would be three common friends of $X_{B}$ and $A$; again, no person from $M_{B}$ knows $A$ ). Thus $M_{A} \geqslant M_{B}$. From symmetry $M_{B}=M_{A}$.
The appropriate situation for the six persons is on the following diagram:

3. Let $S$ be the incenter, $T$ the centroid, and $V$ the orthocenter of a triangle.
a) Show, that $S$ is an interior point of the segment $T V$.
b) Determine the ratio of the side lengths of the triangle, if $S$ is the midpoint of $T V$.
(Jaromír Šimša)
Solution. a) Let $A, B$, and $C$ be the vertices of the triangle with the basis $B C$ Let $H$ be the midpoint of $B C$, and further let $a=B C, b=A C=A B, \beta=\gamma=90^{\circ}-\frac{1}{2} \alpha$. Further let $P, D$, and $M$ be intersections of the height, the bisector, and the median from $B$ with $A C$, respectively.
If $b>a$ (see Fig. 2a), then $\beta>60^{\circ}$ and
$$
\angle C B P=90^{\circ}-\beta<90^{\circ}-60^{\circ}=30^{\circ}<\frac{1}{2} \beta=\angle C B D,
$$
thus $C Pb$ (see Fig. 2b), then $\beta<60^{\circ}$ and similarly as in the previous case $\angle C B P=$ $90^{\circ}-\beta>90^{\circ}-60^{\circ}=30^{\circ}>\frac{1}{2} \beta=\angle C B D, C D / A D=a / b>1$, thus $C P>C D>$ $\frac{1}{2} C A=C M$, and $D$ is inside $M P$ again.

Fig. 2a

Fig. 2b
b) First we express $T H, S H, V H$ using $a, b, c$, and $v$ (the altitude from $A$ of the triangle $A B C$ from $A$ ).
From the properties of the centroid we have $T H=\frac{1}{3} v$.
$S H$ is the inradius, thus $S_{A B C}=\varrho \cdot s$ with $s=\frac{1}{2}(a+2 b)$.
$$
S H=\varrho=\frac{S_{A B C}}{s}=\frac{\frac{1}{2} a v}{\frac{1}{2}(a+2 b)}=\frac{a v}{a+2 b} .
$$
The triangles $B V H$ and $A B H$ are similar (both are right-angled with $\angle V B H=$ $\left.90^{\circ}-\beta=\frac{1}{2} \alpha=\angle B A H\right)$. Thus $V H / B H=B H / A H$ and
$$
V H=\frac{B H^{2}}{A H}=\frac{a^{2}}{4 v}
$$
Now $S, T, V$ lie on the ray $H A$ therefore $T S=S V$ is equivalent to
$$
T H+V H=2 S H,
$$
After easy manipulation we get ( $\operatorname{using} v^{2}=b^{2}-\frac{1}{4} a^{2}$ ):
$$
(2 a-b)(a-b)=0
$$
There is $a \neq b$ (according the statement of the problem), thus $S$ is the midpoint of the segment $T V$ if and only if $2 a=b$, that is the ratio of the side lengths is $1: 2: 2$.
4. Let $p, q$ be two different primes, let $m$ and $n$ be positive integers such that the sum
$$
\frac{m p-1}{q}+\frac{n q-1}{p}
$$
is integer. Prove
$$
\frac{m}{q}+\frac{n}{p}>1
$$
(Jaromír Šimša)
Solution. We rewrite:
$$
\frac{m p-1}{q}+\frac{n q-1}{p}=\frac{p(m p-1)+q(n q-1)}{p q}
$$
The last fraction is a positive integer, thus $p \mid n q-1$ and $q \mid m p-1$, that is $p q \mid$ $m p+n q-1$. Therefore $m p+n q>p q$ which is the inequality in question.
5. There are two circles, both with the radius equal to the distance of their centers. Let $A$ and $B$ be intersections of these circles. We choose $C$ on $k_{2}$ such, that the segment $B C$ meets again $k_{1}$ in L. Line AC meets $k_{1}$ again in K. Prove, that the line of the median through $C$ of the triangle $K L C$ passes through a fixed point, which is independent of the position of $C$.
(Tomáš Jurík)
Solution. Let $S_{1}, S_{2}$ be the centers of $k_{1}, k_{2}$ respectively. Let $P$ be on $k_{1}$ such that $P S_{2}$ is a diameter of $k_{1}$. We show, that $P$ is the sought point, namely we prove that the midpoint of $K L$ is collinear with $P$ and $C$.
Let $Q$ be the point reflection of $S_{1}$ with respect to $S_{2}$. That is $S_{1} Q$ is a diameter of $k_{2}$ and the angle $S_{1} B Q$ is right, thus $B Q$ is tangent to $k_{1}$. According to the statement of the problem, $C$ has to be inside the shorter arc $A Q$ of $k_{2}$. If we consider the reflection along $S_{1} S_{2}$ we see that $P A$ is tangent to $k_{1}$ as well, that is $K$ is inside the shorter $\operatorname{arc} P A$ of $k_{1}$ (Fig. 3).

Fig. 3
Since $k_{1}$ and $k_{2}$ have the same radii, the triangles $S_{1} S_{2} A$ and $S_{1} S_{2} B$ are equilateral and $\angle B S_{1} A=120^{\circ}$. The corresponding inscribed angle $B P A$ is therefore $60^{\circ}$. Moreover $A$ and $B$ are symmetric along $P S_{2}$, thus $P A=P B$ and $A P B$ is equilateral. Any angle that subtends $A P, P B$, or $B A$ in $k_{1}$ (or $A B$ in $k_{2}$ as well) is therefore $60^{\circ}$. Thus
$$
\angle A C B=60^{\circ}, \quad \angle P L B=60^{\circ}, \quad \angle P K A=120^{\circ} \text {. }
$$
The equality of the first two angles implies $P L$ and $K C$ are parallel, the sum of the first and third angle is $180^{\circ}$ therefore $P K$ and $L C$ are parallel as well. Thus $P L C K$ is parallelogram and since diagonals in any parallelogram half each other we are done.
6. Find the greatest real $k$ such that
$$
\frac{2\left(a^{2}+k a b+b^{2}\right)}{(k+2)(a+b)} \geqslant \sqrt{a b}
$$
holds for any positive real $a$ and $b$.
(Ján Mazák)
Solution. If $k=2$ then the inequality is equivalent to $\frac{1}{2}(a+b) \geqslant \sqrt{a b}$ (which holds), therefore $k \geqslant 2$. For $k>2$ we have $k+2>0$
$$
2\left(a^{2}+k a b+b^{2}\right) \geqslant(k+2)(a+b) \sqrt{a b},
$$
the division by $b^{2}$ gives
$$
2\left(\frac{a^{2}}{b^{2}}+k \frac{a}{b}+1\right) \geqslant(k+2)\left(\frac{a}{b}+1\right) \sqrt{\frac{a}{b}} .
$$
Denote $\sqrt{a / b}=x$. The value of $x$ can be any positive number. Thus the problem is equivalent to find greatest $k$, such that
$$
2\left(x^{4}+k x^{2}+1\right) \geqslant(k+2)\left(x^{2}+1\right) x
$$
holds for any positive $x$. We get
$$
\begin{aligned}
k\left(\left(x^{2}+1\right) x-2 x^{2}\right) & \leqslant 2\left(x^{4}+1-\left(x^{2}+1\right) x\right), \\
k\left(x^{3}-2 x^{2}+x\right) & \leqslant 2\left(x^{4}-x^{3}-x+1\right), \\
k x\left(x^{2}-2 x+1\right) & \leqslant 2\left(x^{3}(x-1)-(x-1)\right), \\
k x(x-1)^{2} & \leqslant 2(x-1)^{2}\left(x^{2}+x+1\right) .
\end{aligned}
$$
For $x=1$ the inequality holds. If $x \neq 1$ then the division by positive number $x(x-1)^{2}$ gives
$$
k \leqslant \frac{2\left(x^{2}+x+1\right)}{x}=2+2\left(x+\frac{1}{x}\right) .
$$
If $x \neq 1$ then the values of $x+1 / x$ fill the whole interval $(2, \infty)$, the RHS can be any number in $(6, \infty)$, consequently $k \geqslant 6$.
1. In the domain of real numbers solve the following system of equations
$$
\begin{aligned}
& y+3 x=4 x^{3}, \\
& x+3 y=4 y^{3} .
\end{aligned}
$$
(Pavel Calábek)
Solution. The sum and the difference of the equations gives
$$
\begin{aligned}
& 4(x+y)=4\left(x^{3}+y^{3}\right), \\
& 2(x-y)=4\left(x^{3}-y^{3}\right),
\end{aligned}
$$
or
$$
\begin{aligned}
x+y & =(x+y)\left(x^{2}-x y+y^{2}\right), \\
\frac{1}{2}(x-y) & =(x-y)\left(x^{2}+x y+y^{2}\right) .
\end{aligned}
$$
If $x+y=0$, then the substitution $y=-x$ into the original first equation gives $2 x=4 x^{3}$, or $x\left(2 x^{2}-1\right)=0$. This equation has three roots $x=0$ and $x= \pm \frac{1}{2} \sqrt{2}$, thus we get three solutions $(0,0),\left(\frac{1}{2} \sqrt{2},-\frac{1}{2} \sqrt{2}\right)$, and $\left(-\frac{1}{2} \sqrt{2}, \frac{1}{2} \sqrt{2}\right)$.
If $x-y=0$, then substituting $y=x$ we get $4 x=4 x^{3}$, or $x\left(x^{2}-1\right)=0$ and we get two new solutions $(1,1)$ and $(-1,-1)$.
Now let $x+y$ and $x-y$ be both non-zero. Then
$$
\begin{aligned}
& 1=x^{2}-x y+y^{2}, \\
& \frac{1}{2}=x^{2}+x y+y^{2} .
\end{aligned}
$$
The sum and the difference of the equations is $x^{2}+y^{2}=\frac{3}{4}$ and $x y=-\frac{1}{4}$, thus
$$
(x+y)^{2}=x^{2}+y^{2}+2 x y=\frac{3}{4}-\frac{1}{2}=\frac{1}{4},
$$
and $x+y=\frac{1}{2}$ or $x+y=-\frac{1}{2}$, it means $x, y$ are then the solutions of the quadratic equations
$$
t^{2}-\frac{1}{2} t-\frac{1}{4}=0, \quad \text { resp. } \quad t^{2}+\frac{1}{2} t-\frac{1}{4}=0
$$
with roots $t_{1,2}=\frac{1}{4} \pm \frac{1}{4} \sqrt{5}$, resp. $t_{3,4}=-\frac{1}{4} \pm \frac{1}{4} \sqrt{5}$, and we get four other solutions: $\left(t_{1}, t_{2}\right),\left(t_{2}, t_{1}\right),\left(t_{3}, t_{4}\right),\left(t_{4}, t_{3}\right)$.
Conclusion. The solutions of the problem are
$$
\begin{gathered}
(0,0),\left(\frac{1}{2} \sqrt{2},-\frac{1}{2} \sqrt{2}\right),\left(-\frac{1}{2} \sqrt{2}, \frac{1}{2} \sqrt{2}\right),(1,1),(-1,-1), \\
\left(\frac{1}{4}+\frac{1}{4} \sqrt{5}, \frac{1}{4}-\frac{1}{4} \sqrt{5}\right),\left(\frac{1}{4}-\frac{1}{4} \sqrt{5}, \frac{1}{4}+\frac{1}{4} \sqrt{5}\right) \\
\left(-\frac{1}{4}+\frac{1}{4} \sqrt{5},-\frac{1}{4}-\frac{1}{4} \sqrt{5}\right),\left(-\frac{1}{4}-\frac{1}{4} \sqrt{5},-\frac{1}{4}+\frac{1}{4} \sqrt{5}\right) .
\end{gathered}
$$
2. Let $A B$ and $C D$ be the basis and $M$ the midpoint of the diagonal $A C$ of $a$ trapezoid $A B C D$. Prove that if $A B M$ and $A C D$ have the same area then $D M$ and $B C$ are parallel.
(Jaroslav Švrček)
Solution. $B M$ is the median of $A B C$ (Fig. 1), thus $B M$ cuts $A B C$ into two triangles with the same area. One of them $(A B M)$ has the same area as $A C D$, that is the area of $A B C$ is the double of the area of $A C D$. These triangles have the same altitudes on $A B$ and on $C D$ respectively (the height of the trapezoid), therefore $A B=2 C D$.

Fig. 1
Let $E$ be on the line $C D$ such, that $D$ is the midpoint of $C E$. Since $A B=2 C D$ we have $C E=A B$, that is $A B C E$ is a parallelogram. We know $M$ is the midpoint of $B E$ therefore it is the midpoint of $B E$ as well. Thus $D M$ is a mid-segment of $B C E$, therefore $D M$ is parallel to $B C$.
3. Find all positive integers $n$ such that $\left(2^{n}+1\right)\left(3^{n}+2\right)$ is divisible by $5^{n}$.
(Ján Mazák)
Solution. The following table shows $2^{n}+1$ and $3^{n}+2$ modulo 5 (we know, that both sequences modulo 5 have to be periodic):
| $n$ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | $\ldots$ |
| ---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $2^{n}+1$ | 3 | 5 | 9 | 17 | 33 | 65 | 129 | 257 | $\ldots$ |
| modulo 5 | 3 | 0 | 4 | 2 | 3 | 0 | 4 | 2 | $\ldots$ |
| $3^{n}+2$ | 5 | 11 | 29 | 83 | 245 | 731 | 2189 | 6563 | $\ldots$ |
| modulo 5 | 0 | 1 | 4 | 3 | 0 | 1 | 4 | 3 | $\ldots$ |
Both sequences modulo 5 are periodic with period 4 . But $2^{n}+1$ is divisible by 5 iff $n$ is 2 modulo 4 , and $3^{n}+2$ is divisible by 5 iff $n$ is 1 modulo 4 . Thus if $5^{n}$ should divide $\left(2^{n}+1\right)\left(3^{n}+2\right)$, it has to divide one of the factors. But for $n \geqslant 2$ obviously $5^{n}>3^{n}+2$ and $5^{n}>2^{n}+1$ and $5^{n}$ cannot divide any of the factors. For $n=1$ we have $5^{1} \mid\left(2^{1}+1\right)\left(3^{1}+2\right)=15$, thus $n=1$ is the unique solution of the problem.
## Second Round of the 61st Czech and Slovak
Mathematical Olympiad
(January 17th, 2012)
$\mathbb{N} /$ 行
1. Let $S_{n}$ denotes the sum of all n-digit numbers, which contain only digits 1,2 , 3, at least once each. Find all integers $n \geqslant 3$ such that $S_{n}$ is divisible by 7 .
(Pavel Novotný)
Solution. Similarly as in Problem 1 of the take-home part, we compute the sum by summing up all the contributions by all digits. The number of occurrences of any of the digits on an arbitrary but given place in the number is $k=3^{n-1}-2 \cdot 2^{n-1}+1$ (we fix one position, if all the others were arbitrary, we would get $3^{n}$ occurrences, but we have to subtract numbers consisting only of two or one digit). Then the contribution $p$ of the digit 1 to the sum is
$$
p=k+10 k+100 k+\cdots+10^{n-1} k=\left(1+10+100+\cdots+10^{n-1}\right) k=\frac{10^{n}-1}{9} k .
$$
The contributions of the digit 2 and 3 are obviously $2 p$ and $3 p$, thus
$$
S_{n}=p+2 p+3 p=6 p=6 \cdot \frac{10^{n}-1}{9} k=\frac{2}{3}\left(10^{n}-1\right)\left(3^{n-1}-2^{n}+1\right) .
$$
$S_{n}$ is divisible by 7 iff at least one of the factors $10^{n}-1,3^{n-1}-2^{n}+1$ is. The following table lists the factors modulo 7 for a few small integers:
| $n$ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| ---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $10^{n}-1$ | 9 | 99 | 999 | 9999 | 99999 | 999999 | $\ldots$ | |
| modulo 7 | 2 | 1 | 5 | 3 | 4 | 0 | 2 | 1 |
| $3^{n-1}-2^{n}+1$ | 0 | 0 | 2 | 12 | 50 | 180 | 602 | 1932 |
| modulo 7 | 0 | 0 | 2 | 5 | 1 | 5 | 0 | 0 |
Both sequences modulo 7 are periodic with the period $6\left(10^{n}\right.$ modulo 7 is periodic with the period 6 , so is $10^{n}-1 ; 3^{n}$ modulo 7 is periodic with the period 6 and $2^{n}$ modulo 7 has period 3 , thus $3^{n-1}-2^{n}+1$ has period 6 ) and $10^{n}-1$ is divisible by 7 for $n=6 k, 3^{n-1}-2^{n}+1$ is a multiple of 7 for $n=6 k+1$ or $n=6 k+2$.
Conclusion. All solutions of the problem are integers of the form $6 m, 6 m+1$, and $6 m+2$ for any positive integer $m$.
2. Find an arithmetic progression with the first element an integer $a>1$ such that exactly two numbers from $a^{2}, a^{3}, a^{4}, a^{5}$ are elements of the progression as well and it's difference is as large as possible (the difference does not have to be an integer).
(Jaromír Šimša)
Solution. An arithmetic progression $\mathcal{A}$ with the first element $a$ and a positive difference $d$ contains those numbers from $a^{2}, a^{3}, a^{4}, a^{5}$ for which the corresponding difference from
$$
\begin{aligned}
& a^{2}-a=a(a-1), \\
& a^{3}-a=a(a-1)(a+1), \\
& a^{4}-a=a(a-1)\left(a^{2}+a+1\right), \\
& a^{5}-a=a(a-1)(a+1)\left(a^{2}+1\right)
\end{aligned}
$$
is an integer multiple of $d$.
Let us suppose $\mathcal{A}$ contains just two numbers out of $a^{2}, a^{3}, a^{4}, a^{5}$. If $a^{2} \in \mathcal{A}$, then $a(a-1)$ is an integer multiple of $d$. Since $a$ is an integer, then all the differences in (1) (all of them are integer multiples of $a(a-1)$ ) are integer multiples of $d$. Thus $\mathcal{A}$ contains all numbers $a^{2}, a^{3}, a^{4}, a^{5}$, therefore the sought $\mathcal{A}$ does not contain $a^{2}$, and it contains exactly two from $a^{3}, a^{4}, a^{5}$.
If $a^{3} \notin \mathcal{A}$, or $a^{4}, a^{5} \in \mathcal{A}$, then
$$
\frac{a^{4}-a}{d}, \quad \frac{a^{5}-a}{d}
$$
are integers.
Then also
$$
\frac{a^{5}-a}{d}-a \cdot \frac{a^{4}-a}{d}=\frac{a^{2}-a}{d}
$$
is integer. Consequently $a^{2} \in \mathcal{A}$, contradiction. Thus $a^{3} \in \mathcal{A}$. Then we have $d \leqslant a^{3}-a$ for the difference $d$, where the equation holds ( $d$ is the largest one) if $a^{3}$ is the second element of the progression. Then $a^{2} \notin \mathcal{A}$, and $a+\left(a^{2}+1\right)\left(a^{3}-a\right)=a^{5} \in \mathcal{A}$. Also
$$
\frac{a^{4}-a}{d}=\frac{a^{4}-a}{a^{3}-a}=\frac{a^{2}+a+1}{a+1}=a+\frac{1}{a+1}
$$
is not an integer for any positive integer $a$, which shows $a^{4} \notin \mathcal{A}$.
Conclusion. The sought arithmetic progression is the progression with the first element $a$ and the difference $d=a^{3}-a$.
3. Let $A B C D E F$ be an inscribed hexagon, in which $A B \perp B D, B C=E F$. Moreover, suppose that the lines $B C$ and $E F$ cut $A D$ in $P, Q$, respectively. Denote $S$ the midpoint of $A D$ and $K, L$ the incenters of $B P S, E Q S$. Prove that the angle $K L D$ is right. (Tomáš Jurík)
Solution. Let $k$ be the circumcircle of the hexagon. Since $A P \perp B D, k$ is a Thales circle with diameter $A D$, thus $S$, the midpoint of $A D$, is the center of $k$ as well. We show $\angle K D L=90^{\circ}$. There is $\angle K D L=\angle K D S+\angle L D S$. Moreover the triangles
$K D S$ and $K B S$ are congruent according to the sas theorem: both of them have $S K$ as a side, $S D$ and $S B$ are both diameters of $k$, and $\angle B S K=\angle K S D$ because $S K$ is the angle bisector of $B S P$ (Fig. 1). Thus $\angle K D S=\angle K B S$. Since $B K$ is the angle

Fig. 1
bisector of $S B P$ we have $\angle K D S=\frac{1}{2} \angle C B S$. Similarly $\angle L D S=\frac{1}{2} \angle Q E S$.
Now we use the assumption $B C=E F$. Then $B C S$ and $E F S$ are congruent isosceles triangles (with the legs equal to the radius of $k$ ), thus $\angle C B S=\angle F E S$. In total
$$
\begin{aligned}
\angle K D L & =\angle K D S+\angle L D S=\frac{1}{2} \angle C B S+\frac{1}{2} \angle Q E S= \\
& =\frac{1}{2} \angle F E S+\frac{1}{2} \angle Q E S=\frac{1}{2}(\angle F E S+\angle Q E S)=\frac{1}{2} \cdot 180^{\circ}=90^{\circ} .
\end{aligned}
$$
4. Among real numbers $a, b, c$, and $d$ which satisfy
$$
a b+c d=a c+b d=4 \quad a \quad a d+b c=5
$$
find these, for which the value of $a+b+c+d$ is the least possible. Find this (the least) value as well.
(Jaromír Šimša)
Solution. We have
$$
\begin{aligned}
(a+b+c+d)^{2} & =a^{2}+b^{2}+c^{2}+d^{2}+2(a b+c d+a c+b d+a d+b c)= \\
& =a^{2}+b^{2}+c^{2}+d^{2}+2(4+4+5)=a^{2}+d^{2}+b^{2}+c^{2}+26 .
\end{aligned}
$$
Now $a^{2}+d^{2} \geqslant 2 a d, b^{2}+c^{2} \geqslant 2 b c$ where the equality holds iff $a=d$ and $b=c$ and from (1) we get
$$
(a+b+c+d)^{2} \geqslant 2 a d+2 b c+26=2 \cdot 5+26=36 .
$$
Thus among reals which satisfy the conditions we always have $a+b+c+d \geqslant 6$, where the equality holds iff $a=d$ and $b=c$, or
$$
2 a b=4, \quad a^{2}+b^{2}=5,
$$
thus $\{a, b\}=\{1,2\}$.
Conclusion. The sought $a, b, c, d$ are the quadruples $(1,2,2,1)$ and $(2,1,1,2)$ with the least value of $a+b+c+d=6$.
Final Round of the 61st Czech and Slovak
Mathematical Olympiad
(March 26-27, 2012)
$\mathbb{N} / /$ (6)
1. Find all integers $n$ such that $n^{4}-3 n^{2}+9$ is prime.
(Aleš Kobza)
Solution. We factorize the given expression:
$n^{4}-3 n^{2}+9=n^{4}+6 n^{2}+9-9 n^{2}=\left(n^{2}+3\right)^{2}-(3 n)^{2}=\left(n^{2}+3 n+3\right)\left(n^{2}-3 n+3\right)$.
Should the product be a prime $p$, one of the factors should be 1 or -1 and the other one then $p$ or $-p$. But both of the factors are only positive (they have negative discriminants), thus the only possibilities are
$$
n^{2}+3 n+3=1 \quad \text { or } \quad n^{2}-3 n+3=1 \text {. }
$$
The roots of the first equation are $n=-1$ and $n=-2$, the second equation has roots $n=1$ and $n=2$. In both cases the values of the other factor are 7 or 13 which are primes.
Conclusion. The number $n^{4}-3 n^{2}+9$ is prime iff $n \in\{-2,-1,1,2\}$.
2. Find the greatest possible area of a triangle ABC with medians satisfying $t_{a} \leqslant 2$, $t_{b} \leqslant 3, t_{c} \leqslant 4$.
(Pavel Novotný)
Solution. Let $T$ be the centroid of $A B C$ and $K, L, M$ be the midpoints of $B C$, $C A, A B$. Medians cut $A B C$ into six smaller triangles, each with the same area: for example in the triangle $A M T$ we have $A M=\frac{1}{2} c$, its altitude through $T$ is $\frac{1}{3} v_{c}$ long, that is $S_{A M T}=\frac{1}{2} \cdot \frac{1}{2} c \cdot \frac{1}{3} v_{c}=\frac{1}{6} \cdot \frac{1}{2} c \cdot v_{c}=\frac{1}{6} S_{A B C}$. Analogously for the other triangles.

Fig. 1
Thus we will seek for the greatest possible area of one of the triangles, say $A T L$ (Fig. 1), and then we multiply the result by six. There is
$$
A T=\frac{2}{3} t_{a} \leqslant \frac{4}{3}, \quad T L=\frac{1}{3} t_{b} \leqslant 1
$$
Therefore we can constrain the area:
$$
S_{A T L}=\frac{1}{2} A T \cdot T L \cdot \sin \angle A T L \leqslant \frac{1}{2} \cdot \frac{4}{3}=\frac{2}{3} .
$$
Thus the area of the $A B C$ can be at most $6 \cdot \frac{2}{3}=4$, where the equality holds iff $t_{a}=2, t_{b}=3$ and $\angle A T L=90^{\circ}$.
There is a triangle satisfying the conditions with the area 6 indeed: first we construct right triangle $A T L$ with the legs $A T=\frac{4}{3}$ and $T L=1$. Then $C$ is the symmetric image of $A$ with respect to $L$ and $B$ is the image of $L$ under the homothety with center $T$ and coefficient -2 (Fig. 2). It is easy to count the length of $A B$. For

Fig. 2
example the theorem of Pythagoras in $A B T$ gives
$$
A B=\sqrt{A T^{2}+T B^{2}}=\sqrt{\frac{16}{9}+4}=\sqrt{\frac{52}{9}}=\frac{2}{3} \sqrt{13} .
$$
Since $M$ is on the Thales' circle with the diameter $A B$, there is $M T=\frac{1}{2} A B=\frac{1}{3} \sqrt{13}$. Then $t_{c}=3 \cdot M T=\sqrt{13}<4$.
Conclusion. The greatest possible area of the triangle $A B C$ is 4 .
3. Prove that among any 101 real numbers one can choose $u$ and $v$ such that
$$
100|u-v| \cdot|1-u v| \leqslant\left(1+u^{2}\right)\left(1+v^{2}\right) \text {. }
$$
(Pavel Calábek)
Solution. Since $1+x^{2}>0$ for any real $x$ we get equivalent inequalities:
$$
\begin{aligned}
100|(u-v)(1-u v)| & \leqslant\left(1+u^{2}\right)\left(1+v^{2}\right), \\
100\left|u-v-u^{2} v+u v^{2}\right| & \leqslant\left(1+u^{2}\right)\left(1+v^{2}\right), \\
\left|u\left(1+v^{2}\right)-v\left(1+u^{2}\right)\right| & \leqslant \frac{1}{100}\left(1+u^{2}\right)\left(1+v^{2}\right), \\
\left|\frac{u}{1+u^{2}}-\frac{v}{1+v^{2}}\right| & \leqslant \frac{1}{100} .
\end{aligned}
$$
Values of
$$
f(x)=\frac{x}{1+x^{2}}, \quad x \in \mathbb{R}
$$
are in $\left\langle-\frac{1}{2}, \frac{1}{2}\right\rangle$, since for any real $x$ we have
$$
|x|=\sqrt{1 \cdot x^{2}} \leqslant \frac{1+x^{2}}{2} \quad \text { hence } \quad \frac{|x|}{1+x^{2}} \leqslant \frac{1}{2} .
$$
Now divide $\left\langle-\frac{1}{2}, \frac{1}{2}\right\rangle$ into one hundred intervals of the length $\frac{1}{100}$. According to the Pigeon hole principle, among any 101 real numbers there are $u$ and $v$ such that $f(u)$ and $f(v)$ lie in the same interval, that is $|f(u)-f(v)| \leqslant \frac{1}{100}$, which is exactly the inequality (1), which is equivalent to the original inequality.
4. There is a point $X$ inside a parallelogram ABCD. Construct a line, which goes through $X$ and divides the parallelogram into two parts, with the greatest possible difference in their areas.
(Vojtech Bálint)
Solution. The sum of the areas of the two parts, into which the line cuts the parallelogram $A B C D$ is constant, their difference will be the greatest iff the smaller area will be the smallest possible. First notice that if $X$ is the center of $A B C D$, than any line through $X$ divides $A B C D$ into two parts of the same area - they are symmetric reflections of each other with respect to $X$. Thus any line through $X$ is a solution of the given problem.
Generally, let $K, L, M$, and $N$ be the midpoints of $A B, B C, C D$, and $D A$ and let $S$ be the center of $A B C D$. First, let as assume $X$ is inside of the parallelogram $A K S N$ (then the symmetric reflection $A^{\prime}$ of $A$ with respect to $X$ lies inside $A B C D$ ).
Consider two lines parallel to sides of $A B C D$ going through $A^{\prime}$. Denote $P$ and $Q$ their intersections with $A B$ and $A D$. Then $A P A^{\prime} Q$ is parallelogram with the center $X$. Thus any line passing through $X$ divides $A P A^{\prime} Q$ into two shapes of the same area. Each of these shapes lies in different parts, into which the line cuts $A B C D$ (Fig. 3a). That is both of the parts of $A B C D$ have the area at least the half of the area of $A P A^{\prime} Q$. Thus the smaller part of $A B C D$ will have the smallest possible area iff it will be inside of $A P A^{\prime} Q$. This will be the case for the line $P Q$ (Fig. $3 \mathrm{~b}$ ).

Fig. 3a

Fig. 3b
Analogously we find the line, if $X$ is inside of $K B L S, S L C M$, or $N S M D$.
Finally if $X$ inside of any of $K S$, similarly we consider the parallelogram $A B A^{\prime} B^{\prime}$ with $A^{\prime}$ and $B^{\prime}$ being the symmetric reflections of $A$ and $B$ with respect to $X$. Now the sought lines again have to cut $A B C D$ into two parts one of which is inside $A B A^{\prime} B^{\prime}$. Obviously, such is any line $U X$, where $U$ is arbitrary point of $A B^{\prime}$ (Fig. 4a,b).

Fig. 4a

Fig. $4 \mathrm{~b}$
Analogously we find the lines if $X$ is inside of $S M, N S$, or $S L$.
Conclusion. If $X$ is the center of quadrilateral $A B C D$ then any line passing through $X$ is the solution, if $X$ is off $K M$ and $N L$ then unique line solves the problem. If $X$ is inside $K S, S M, N S$, or $S L$ then infinitely many lines are the solution. In each of the cases the construction is straight forward considering the facts, which have been mentioned.
5. In a group of 90 children, each one has at least 30 friends (friendship is mutual). Prove that children can be divided into 3 groups containing 30 children each, such that any child has a friend in his (her) group.
Solution. There are
$$
V=\left(\begin{array}{c}
90 \\
30
\end{array}\right) \cdot\left(\begin{array}{c}
60 \\
30
\end{array}\right) \cdot \frac{1}{3 !}
$$
divisions into three groups of 30 children.
We call a division bad because of $A$, if the child $A$ has no friend in his (her) group in the division. We show, that the number $Z$ of bad divisions (i.e. the divisions which do not meet the conditions of the problem) is less than $V$.
Let $Z_{A}$ denotes the number of divisions which are bad because of $A$. If $A$ has $n$ friends in the group altogether, then there exists
$$
\left(\begin{array}{c}
89-n \\
29
\end{array}\right)
$$
groups of 30 children, containing $A$ and 29 other children, non of whom is a friend with $A$.
For each such a group, the children left can be divided in
$$
\left(\begin{array}{l}
60 \\
30
\end{array}\right) \cdot \frac{1}{2}
$$
ways into two groups of 30 children. Thus we get the following estimate for the number of divisions, which are bad because of $A$ (taking into account that $n \geqslant 30$, that is $89-n \geqslant 59)$ :
$$
Z_{A}=\left(\begin{array}{c}
89-n \\
29
\end{array}\right) \cdot\left(\begin{array}{l}
60 \\
30
\end{array}\right) \cdot \frac{1}{2} \leqslant\left(\begin{array}{c}
59 \\
29
\end{array}\right) \cdot\left(\begin{array}{l}
60 \\
30
\end{array}\right) \cdot \frac{1}{2}
$$
The number of all bad divisions is certainly not greater than a sum of all bad divisions for every child individually (a division can be bad because of more children). Since there is 90 children, according to (1) we get
$$
Z \leqslant 90 \cdot\left(\begin{array}{c}
59 \\
29
\end{array}\right) \cdot\left(\begin{array}{l}
60 \\
30
\end{array}\right) \cdot \frac{1}{2}
$$
Thus to prove $Z$ $1,5^{30}=2,25^{15}>2^{15}>270=6 \cdot 45$ and we are done.
6. In the domain of real numbers solve the following system of equations
$$
\begin{aligned}
& x^{4}+y^{2}+4=5 y z \\
& y^{4}+z^{2}+4=5 z x \\
& z^{4}+x^{2}+4=5 x y .
\end{aligned}
$$
(Jaroslav Švrček)
Solution. First we give an estimate of the LHS of the first equation. Consider the obvious inequality $4 x^{2} \leqslant x^{4}+4$ (it is equivalent to $0 \leqslant\left(x^{2}-2\right)^{2}$ ), which holds for any real number $x$ with the equality iff $x= \pm \sqrt{2}$. Then
$$
4 x^{2}+y^{2} \leqslant x^{4}+y^{2}+4=5 y z .
$$
Analogously we get next two inequalities. Thus we have
$$
4 x^{2}+y^{2} \leqslant 5 y z, \quad 4 y^{2}+z^{2} \leqslant 5 z x, \quad 4 z^{2}+x^{2} \leqslant 5 x y
$$
Summing up these inequalities we get
$$
x^{2}+y^{2}+z^{2} \leqslant x y+y z+z y,
$$
which is equivalent to
$$
(x-y)^{2}+(y-z)^{2}+(z-x)^{2} \leqslant 0 .
$$
Thus
$$
x=y=z=\sqrt{2} \quad \text { or } \quad x=y=z=-\sqrt{2} \text {. }
$$
which are indeed solutions.
Conclusion. The solutions of the given system are the triples $(\sqrt{2}, \sqrt{2}, \sqrt{2})$ and $(-\sqrt{2},-\sqrt{2},-\sqrt{2})$.