## [Solutions] Czech-Polish-Slovak Mathematics Competition 2018

1. Determine all functions $f : \mathbb R \to \mathbb R$ such that for all real numbers $x$ and $y$, $$f(x^2 + xy) = f(x)f(y) + yf(x) + xf(x+y).$$
2. Let $ABC$ be an acute scalene triangle. Let $D$ and $E$ be points on the sides $AB$ and $AC$, respectively, such that $BD=CE$. Denote by $O_1$ and $O_2$ the circumcentres of the triangles $ABE$ and $ACD$, respectively. Prove that the circumcircles of the triangles $ABC$, $ADE$, and $AO_1O_2$ have a common point different from $A$.
3. There are $2018$ players sitting around a round table. At the beginning of the game we arbitrarily deal all the cards from a deck of $K$ cards to the players (some players may receive no cards). In each turn we choose a player who draws one card from each of the two neighbors. It is only allowed to choose a player whose each neighbor holds a nonzero number of cards. The game terminates when there is no such player. Determine the largest possible value of $K$ such that, no matter how we deal the cards and how we choose the players, the game always terminates after a finite number of turns.
4. Let $ABC$ be an acute triangle with the perimeter of $2s$. We are given three pairwise disjoint circles with pairwise disjoint interiors with the centers $A, B$, and $C$, respectively. Prove that there exists a circle with the radius of $s$ which contains all the three circles.
5. In a $2 \times 3$ rectangle there is a polyline of length $36$, which can have self-intersections. Show that there exists a line parallel to two sides of the rectangle, which intersects the other two sides in their interior points and intersects the polyline in fewer than $10$ points.
6. We say that a positive integer $n$ is fantastic if there exist positive rational numbers $a$ and $b$ such that $$n = a + \frac 1a + b + \frac 1b.$$ a) Prove that there exist infinitely many prime numbers $p$ such that no multiple of $p$ is fantastic.
b) Prove that there exist infinitely many prime numbers $p$ such that some multiple of $p$ is fantastic.