di-zhang-fdu/OlympiadExtended huggingface dataset:
Subfield: Geometry


Question: In the triangle $A B C$ the point $J$ is the center of the excircle opposite to $A$. This excircle is tangent to the side $B C$ at $M$, and to the lines $A B$ and $A C$ at $K$ and $L$ respectively. The lines $L M$ and $B J$ meet at $F$, and the lines $K M$ and $C J$ meet at $G$. Let $S$ be the point of intersection of the lines $A F$ and $B C$, and let $T$ be the point of intersection of the lines $A G$ and $B C$. Prove that $M$ is the midpoint of $S T$.

Solution:
Let $\alpha=\angle C A B, \beta=\angle A B C$ and $\gamma=\angle B C A$. The line $A J$ is the bisector of $\angle C A B$, so $\angle J A K=\angle J A L=\frac{\alpha}{2}$. By $\angle A K J=\angle A L J=90^{\circ}$ the points $K$ and $L$ lie on the circle $\omega$ with diameter $A J$.

The triangle $K B M$ is isosceles as $B K$ and $B M$ are tangents to the excircle. Since $B J$ is the bisector of $\angle K B M$, we have $\angle M B J=90^{\circ}-\frac{\beta}{2}$ and $\angle B M K=\frac{\beta}{2}$. Likewise $\angle M C J=90^{\circ}-\frac{\gamma}{2}$ and $\angle C M L=\frac{\gamma}{2}$. Also $\angle B M F=\angle C M L$, therefore

$$
\angle L F J=\angle M B J-\angle B M F=\left(90^{\circ}-\frac{\beta}{2}\right)-\frac{\gamma}{2}=\frac{\alpha}{2}=\angle L A J
$$

Hence $F$ lies on the circle $\omega$. (By the angle computation, $F$ and $A$ are on the same side of $B C$.) Analogously, $G$ also lies on $\omega$. Since $A J$ is a diameter of $\omega$, we obtain $\angle A F J=\angle A G J=90^{\circ}$.

<img_3750>

The lines $A B$ and $B C$ are symmetric with respect to the external bisector $B F$. Because $A F \perp B F$ and $K M \perp B F$, the segments $S M$ and $A K$ are symmetric with respect to $B F$, hence $S M=A K$. By symmetry $T M=A L$. Since $A K$ and $A L$ are equal as tangents to the excircle, it follows that $S M=T M$, and the proof is complete.
Subfield: Geometry


Question: Let $A B C D$ be a cyclic quadrilateral whose diagonals $A C$ and $B D$ meet at $E$. The extensions of the sides $A D$ and $B C$ beyond $A$ and $B$ meet at $F$. Let $G$ be the point such that $E C G D$ is a parallelogram, and let $H$ be the image of $E$ under reflection in $A D$. Prove that $D, H, F, G$ are concyclic.

Solution:
We show first that the triangles $F D G$ and $F B E$ are similar. Since $A B C D$ is cyclic, the triangles $E A B$ and $E D C$ are similar, as well as $F A B$ and $F C D$. The parallelogram $E C G D$ yields $G D=E C$ and $\angle C D G=\angle D C E$; also $\angle D C E=\angle D C A=\angle D B A$ by inscribed angles. Therefore

$$
\begin{gathered}
\angle F D G=\angle F D C+\angle C D G=\angle F B A+\angle A B D=\angle F B E, \\
\frac{G D}{E B}=\frac{C E}{E B}=\frac{C D}{A B}=\frac{F D}{F B}
\end{gathered}
$$

It follows that $F D G$ and $F B E$ are similar, and so $\angle F G D=\angle F E B$.

<img_3480>

Since $H$ is the reflection of $E$ with respect to $F D$, we conclude that

$$
\angle F H D=\angle F E D=180^{\circ}-\angle F E B=180^{\circ}-\angle F G D .
$$

This proves that $D, H, F, G$ are concyclic.
Subfield: Geometry


Question: In an acute triangle $A B C$ the points $D, E$ and $F$ are the feet of the altitudes through $A$, $B$ and $C$ respectively. The incenters of the triangles $A E F$ and $B D F$ are $I_{1}$ and $I_{2}$ respectively; the circumcenters of the triangles $A C I_{1}$ and $B C I_{2}$ are $O_{1}$ and $O_{2}$ respectively. Prove that $I_{1} I_{2}$ and $O_{1} O_{2}$ are parallel.

Solution:
Let $\angle C A B=\alpha, \angle A B C=\beta, \angle B C A=\gamma$. We start by showing that $A, B, I_{1}$ and $I_{2}$ are concyclic. Since $A I_{1}$ and $B I_{2}$ bisect $\angle C A B$ and $\angle A B C$, their extensions beyond $I_{1}$ and $I_{2}$ meet at the incenter $I$ of the triangle. The points $E$ and $F$ are on the circle with diameter $B C$, so $\angle A E F=\angle A B C$ and $\angle A F E=\angle A C B$. Hence the triangles $A E F$ and $A B C$ are similar with ratio of similitude $\frac{A E}{A B}=\cos \alpha$. Because $I_{1}$ and $I$ are their incenters, we obtain $I_{1} A=I A \cos \alpha$ and $I I_{1}=I A-I_{1} A=2 I A \sin ^{2} \frac{\alpha}{2}$. By symmetry $I I_{2}=2 I B \sin ^{2} \frac{\beta}{2}$. The law of sines in the triangle $A B I$ gives $I A \sin \frac{\alpha}{2}=I B \sin \frac{\beta}{2}$. Hence

$$
I I_{1} \cdot I A=2\left(I A \sin \frac{\alpha}{2}\right)^{2}=2\left(I B \sin \frac{\beta}{2}\right)^{2}=I I_{2} \cdot I B .
$$

Therefore $A, B, I_{1}$ and $I_{2}$ are concyclic, as claimed.

<img_3374>

In addition $I I_{1} \cdot I A=I I_{2} \cdot I B$ implies that $I$ has the same power with respect to the circles $\left(A C I_{1}\right),\left(B C I_{2}\right)$ and $\left(A B I_{1} I_{2}\right)$. Then $C I$ is the radical axis of $\left(A C I_{1}\right)$ and $\left(B C I_{2}\right)$; in particular $C I$ is perpendicular to the line of centers $O_{1} O_{2}$.

Now it suffices to prove that $C I \perp I_{1} I_{2}$. Let $C I$ meet $I_{1} I_{2}$ at $Q$, then it is enough to check that $\angle I I_{1} Q+\angle I_{1} I Q=90^{\circ}$. Since $\angle I_{1} I Q$ is external for the triangle $A C I$, we have

$$
\angle I I_{1} Q+\angle I_{1} I Q=\angle I I_{1} Q+(\angle A C I+\angle C A I)=\angle I I_{1} I_{2}+\angle A C I+\angle C A I .
$$

It remains to note that $\angle I I_{1} I_{2}=\frac{\beta}{2}$ from the cyclic quadrilateral $A B I_{1} I_{2}$, and $\angle A C I=\frac{\gamma}{2}$, $\angle C A I=\frac{\alpha}{2}$. Therefore $\angle I I_{1} Q+\angle I_{1} I Q=\frac{\alpha}{2}+\frac{\beta}{2}+\frac{\gamma}{2}=90^{\circ}$, completing the proof.
Subfield: Geometry


Question: Let $A B C$ be a triangle with $A B \neq A C$ and circumcenter $O$. The bisector of $\angle B A C$ intersects $B C$ at $D$. Let $E$ be the reflection of $D$ with respect to the midpoint of $B C$. The lines through $D$ and $E$ perpendicular to $B C$ intersect the lines $A O$ and $A D$ at $X$ and $Y$ respectively. Prove that the quadrilateral $B X C Y$ is cyclic.

Solution:
The bisector of $\angle B A C$ and the perpendicular bisector of $B C$ meet at $P$, the midpoint of the minor arc $\widehat{B C}$ (they are different lines as $A B \neq A C$ ). In particular $O P$ is perpendicular to $B C$ and intersects it at $M$, the midpoint of $B C$.

Denote by $Y^{\prime}$ the reflexion of $Y$ with respect to $O P$. Since $\angle B Y C=\angle B Y^{\prime} C$, it suffices to prove that $B X C Y^{\prime}$ is cyclic.

<img_3587>

We have

$$
\angle X A P=\angle O P A=\angle E Y P .
$$

The first equality holds because $O A=O P$, and the second one because $E Y$ and $O P$ are both perpendicular to $B C$ and hence parallel. But $\left\{Y, Y^{\prime}\right\}$ and $\{E, D\}$ are pairs of symmetric points with respect to $O P$, it follows that $\angle E Y P=\angle D Y^{\prime} P$ and hence

$$
\angle X A P=\angle D Y^{\prime} P=\angle X Y^{\prime} P .
$$

The last equation implies that $X A Y^{\prime} P$ is cyclic. By the powers of $D$ with respect to the circles $\left(X A Y^{\prime} P\right)$ and $(A B P C)$ we obtain

$$
X D \cdot D Y^{\prime}=A D \cdot D P=B D \cdot D C
$$

It follows that $B X C Y^{\prime}$ is cyclic, as desired.
Subfield: Geometry


Question: Let $A B C$ be a triangle with $\angle B C A=90^{\circ}$, and let $C_{0}$ be the foot of the altitude from $C$. Choose a point $X$ in the interior of the segment $C C_{0}$, and let $K, L$ be the points on the segments $A X, B X$ for which $B K=B C$ and $A L=A C$ respectively. Denote by $M$ the intersection of $A L$ and $B K$. Show that $M K=M L$.

Solution:
Let $C^{\prime}$ be the reflection of $C$ in the line $A B$, and let $\omega_{1}$ and $\omega_{2}$ be the circles with centers $A$ and $B$, passing through $L$ and $K$ respectively. Since $A C^{\prime}=A C=A L$ and $B C^{\prime}=B C=B K$, both $\omega_{1}$ and $\omega_{2}$ pass through $C$ and $C^{\prime}$. By $\angle B C A=90^{\circ}, A C$ is tangent to $\omega_{2}$ at $C$, and $B C$ is tangent to $\omega_{1}$ at $C$. Let $K_{1} \neq K$ be the second intersection of $A X$ and $\omega_{2}$, and let $L_{1} \neq L$ be the second intersection of $B X$ and $\omega_{1}$.

<img_3446>

By the powers of $X$ with respect to $\omega_{2}$ and $\omega_{1}$,

$$
X K \cdot X K_{1}=X C \cdot X C^{\prime}=X L \cdot X L_{1}
$$

so the points $K_{1}, L, K, L_{1}$ lie on a circle $\omega_{3}$.

The power of $A$ with respect to $\omega_{2}$ gives

$$
A L^{2}=A C^{2}=A K \cdot A K_{1},
$$

indicating that $A L$ is tangent to $\omega_{3}$ at $L$. Analogously, $B K$ is tangent to $\omega_{3}$ at $K$. Hence $M K$ and $M L$ are the two tangents from $M$ to $\omega_{3}$ and therefore $M K=M L$.
Subfield: Number Theory


Question: Find all triples $(x, y, z)$ of positive integers such that $x \leq y \leq z$ and

$$
x^{3}\left(y^{3}+z^{3}\right)=2012(x y z+2) \text {. }
$$

Solution:
First note that $x$ divides $2012 \cdot 2=2^{3} \cdot 503$. If $503 \mid x$ then the right-hand side of the equation is divisible by $503^{3}$, and it follows that $503^{2} \mid x y z+2$. This is false as $503 \mid x$. Hence $x=2^{m}$ with $m \in\{0,1,2,3\}$. If $m \geq 2$ then $2^{6} \mid 2012(x y z+2)$. However the highest powers of 2 dividing 2012 and $x y z+2=2^{m} y z+2$ are $2^{2}$ and $2^{1}$ respectively. So $x=1$ or $x=2$, yielding the two equations

$$
y^{3}+z^{3}=2012(y z+2), \quad \text { and } \quad y^{3}+z^{3}=503(y z+1)
$$

In both cases the prime $503=3 \cdot 167+2$ divides $y^{3}+z^{3}$. We claim that $503 \mid y+z$. This is clear if $503 \mid y$, so let $503 \nmid y$ and $503 \nmid z$. Then $y^{502} \equiv z^{502}(\bmod 503)$ by FERMAT's little theorem. On the other hand $y^{3} \equiv-z^{3}(\bmod 503)$ implies $y^{3 \cdot 167} \equiv-z^{3 \cdot 167}(\bmod 503)$, i. e. $y^{501} \equiv-z^{501}(\bmod 503)$. It follows that $y \equiv-z(\bmod 503)$ as claimed.

Therefore $y+z=503 k$ with $k \geq 1$. In view of $y^{3}+z^{3}=(y+z)\left((y-z)^{2}+y z\right)$ the two equations take the form

$$
k(y-z)^{2}+(k-4) y z=8 \tag{1}
$$
$$
k(y-z)^{2}+(k-1) y z=1 \tag{2}
$$

In (1) we have $(k-4) y z \leq 8$, which implies $k \leq 4$. Indeed if $k>4$ then $1 \leq(k-4) y z \leq 8$, so that $y \leq 8$ and $z \leq 8$. This is impossible as $y+z=503 k \geq 503$. Note next that $y^{3}+z^{3}$ is even in the first equation. Hence $y+z=503 k$ is even too, meaning that $k$ is even. Thus $k=2$ or $k=4$. Clearly (1) has no integer solutions for $k=4$. If $k=2$ then (1) takes the form $(y+z)^{2}-5 y z=4$. Since $y+z=503 k=503 \cdot 2$, this leads to $5 y z=503^{2} \cdot 2^{2}-4$. However $503^{2} \cdot 2^{2}-4$ is not a multiple of 5 . Therefore (1) has no integer solutions.

Equation (2) implies $0 \leq(k-1) y z \leq 1$, so that $k=1$ or $k=2$. Also $0 \leq k(y-z)^{2} \leq 1$, hence $k=2$ only if $y=z$. However then $y=z=1$, which is false in view of $y+z \geq 503$. Therefore $k=1$ and (2) takes the form $(y-z)^{2}=1$, yielding $z-y=|y-z|=1$. Combined with $k=1$ and $y+z=503 k$, this leads to $y=251, z=252$.

In summary the triple $(2,251,252)$ is the only solution.

Final answer: $(2,251,252)$
Subfield: Number Theory


Question: An integer $a$ is called friendly if the equation $\left(m^{2}+n\right)\left(n^{2}+m\right)=a(m-n)^{3}$ has a solution over the positive integers.
Prove that there are at least 500 friendly integers in the set $\{1,2, \ldots, 2012\}$.

Solution:
Every $a$ of the form $a=4 k-3$ with $k \geq 2$ is friendly. Indeed the numbers $m=2 k-1>0$ and $n=k-1>0$ satisfy the given equation with $a=4 k-3$ :

$$
\left(m^{2}+n\right)\left(n^{2}+m\right)=\left((2 k-1)^{2}+(k-1)\right)\left((k-1)^{2}+(2 k-1)\right)=(4 k-3) k^{3}=a(m-n)^{3} .
$$

Hence $5,9, \ldots, 2009$ are friendly and so $\{1,2, \ldots, 2012\}$ contains at least 502 friendly numbers.
Subfield: Number Theory


Question: An integer $a$ is called friendly if the equation $\left(m^{2}+n\right)\left(n^{2}+m\right)=a(m-n)^{3}$ has a solution over the positive integers.
Decide whether $a=2$ is friendly.

Solution:
We show that $a=2$ is not friendly. Consider the equation with $a=2$ and rewrite its left-hand side as a difference of squares:

$$
\frac{1}{4}\left(\left(m^{2}+n+n^{2}+m\right)^{2}-\left(m^{2}+n-n^{2}-m\right)^{2}\right)=2(m-n)^{3}
$$

Since $m^{2}+n-n^{2}-m=(m-n)(m+n-1)$, we can further reformulate the equation as

$$
\left(m^{2}+n+n^{2}+m\right)^{2}=(m-n)^{2}\left(8(m-n)+(m+n-1)^{2}\right) .
$$

It follows that $8(m-n)+(m+n-1)^{2}$ is a perfect square. Clearly $m>n$, hence there is an integer $s \geq 1$ such that

$$
(m+n-1+2 s)^{2}=8(m-n)+(m+n-1)^{2} .
$$

Subtracting the squares gives $s(m+n-1+s)=2(m-n)$. Since $m+n-1+s>m-n$, we conclude that $s<2$. Therefore the only possibility is $s=1$ and $m=3 n$. However then the left-hand side of the given equation (with $a=2$ ) is greater than $m^{3}=27 n^{3}$, whereas its right-hand side equals $16 n^{3}$. The contradiction proves that $a=2$ is not friendly.
Subfield: Number Theory


Question: Let $x$ and $y$ be positive integers. If $x^{2^{n}}-1$ is divisible by $2^{n} y+1$ for every positive integer $n$, prove that $x=1$.

Solution:
First we prove the following fact: For every positive integer $y$ there exist infinitely many primes $p \equiv 3(\bmod 4)$ such that $p$ divides some number of the form $2^{n} y+1$.

Clearly it is enough to consider the case $y$ odd. Let

$$
2 y+1=p_{1}^{e_{1}} \cdots p_{r}^{e_{r}}
$$

be the prime factorization of $2 y+1$. Suppose on the contrary that there are finitely many primes $p_{r+1}, \ldots, p_{r+s} \equiv 3(\bmod 4)$ that divide some number of the form $2^{n} y+1$ but do not divide $2 y+1$.

We want to find an $n$ such that $p_{i}^{e_{i}} \| 2^{n} y+1$ for $1 \leq i \leq r$ and $p_{i} \nmid 2^{n} y+1$ for $r+1 \leq i \leq r+s$. For this it suffices to take

$$
n=1+\varphi\left(p_{1}^{e_{1}+1} \cdots p_{r}^{e_{r}+1} p_{r+1}^{1} \cdots p_{r+s}^{1}\right)
$$

because then

$$
2^{n} y+1 \equiv 2 y+1 \quad\left(\bmod p_{1}^{e_{1}+1} \cdots p_{r}^{e_{r}+1} p_{r+1}^{1} \cdots p_{r+s}^{1}\right)
$$

The last congruence means that $p_{1}^{e_{1}}, \ldots, p_{r}^{e_{r}}$ divide exactly $2^{n} y+1$ and no prime $p_{r+1}, \ldots, p_{r+s}$ divides $2^{n} y+1$. It follows that the prime factorization of $2^{n} y+1$ consists of the prime powers $p_{1}^{e_{1}}, \ldots, p_{r}^{e_{r}}$ and powers of primes $\equiv 1(\bmod 4)$. Because $y$ is odd, we obtain

$$
2^{n} y+1 \equiv p_{1}^{e_{1}} \cdots p_{r}^{e_{r}} \equiv 2 y+1 \equiv 3 \quad(\bmod 4)
$$

This is a contradiction since $n>1$, and so $2^{n} y+1 \equiv 1(\bmod 4)$.

Now we proceed to the problem. If $p$ is a prime divisor of $2^{n} y+1$ the problem statement implies that $x^{d} \equiv 1(\bmod p)$ for $d=2^{n}$. By FERMAT's little theorem the same congruence holds for $d=p-1$, so it must also hold for $d=\left(2^{n}, p-1\right)$. For $p \equiv 3(\bmod 4)$ we have $\left(2^{n}, p-1\right)=2$, therefore in this case $x^{2} \equiv 1(\bmod p)$.

In summary, we proved that every prime $p \equiv 3(\bmod 4)$ that divides some number of the form $2^{n} y+1$ also divides $x^{2}-1$. This is possible only if $x=1$, otherwise by the above $x^{2}-1$ would be a positive integer with infinitely many prime factors.
Subfield: Algebra


Question: Find all functions $f: \mathbb{Q} \rightarrow \mathbb{Q}$ such that the equation

holds for all rational numbers $x$ and $y$.

$$
f(x f(x)+y)=f(y)+x^{2}
$$

Here, $\mathbb{Q}$ denotes the set of rational numbers.

Solution:
Denote the equation from the statement by (1). Let $x f(x)=A$ and $x^{2}=B$. The equation (1) is of the form

$$
f(A+y)=f(y)+B
$$

Also, if we put $y \rightarrow-A+y$, we have $f(A-A+y)=f(-A+y)+B$. Therefore

$$
f(-A+y)=f(y)-B
$$

We can easily show that for any integer $n$ we even have

$$
f(n A+y)=f(y)+n B \tag{2}
$$

Indeed, it's trivially true for $n=0$ and if this holds true for some integer $n$, then

$$
f((n+1) A+y)=f(A+y+n A)=f(n y+A)+B=f(y)+n B+B=f(y)+(n+1) B
$$

and

$$
f((n-1) A+y)=f(-A+n A+y)=f(n A+y)-B=f(y)+n B-B=f(y)+(n-1) B .
$$

So, equation (2) follows from the induction on $n$.

Now we can say that for any integer $k$ it holds

$$
f(n x f(x)+y)=f(y)+n x^{2} \tag{3}
$$

If $y$ is given, then $f(y)+n x^{2}$ can be any rational number, since $n x^{2}$ can be any rational number. If it is supposed to be $\frac{p}{q}$, where $q \neq 0$, then we may take $n=p q$, and $x=\frac{1}{q}$. Therefore $f$ is surjective on $\mathbb{Q}$. So there's a rational number $c$ such that $f(c)=0$. Be putting $x=c$ into (1) we immediately get $c=0$, i.e. $f(0)=0$. Therefore, $f(x)=0$ if and only if $x=0$.

For any integer $n$ and for any rational $x, y$ it holds

$$
f\left(n^{2} x f(x)+y\right)=f(y)+n^{2} x^{2}=f(y)+(n x)^{2}=f(n x f(n x)+y)
$$

After taking $y=-n x f(n x)$ in (4), the right-hand side becomes 0 , therefore

$$
n^{2} x f(x)-n x f(n x)=0
$$

This simplifies into $n f(x)=f(n x)$ for $x \neq 0$, but it also holds for $x=0$. Therefore, for any rational number $x=\frac{p}{q}$ we have,

$$
f(x)=f\left(\frac{p}{q}\right)=f\left(p \cdot \frac{1}{q}\right)=p \cdot f\left(\frac{1}{p}\right)=p \cdot \frac{f\left(q \cdot \frac{1}{q}\right)}{q}=\frac{p}{q} \cdot f(1)=x f(1)
$$

So, we have $f(x)=k x$, for some rational number $k$. Let's put this answer in (1) and we get $k(x k x+y)=k y+x^{2}$, thus $k^{2}=1$. Therefore $f(x)=x$ and $f(x)=-x$ are solutions.

Final answer: $f(x)=x,f(x)=-x$
Subfield: Geometry


Question: Let $A B C$ be a triangle with incentre Iand let $D$ be an arbitrary point on the side $B C$. Let the line through $D$ perpendicular to $B I$ intersect $C I$ at $E$. Let the line through $D$ perpendicular to $C I$ intersect $B I$ at $F$. Prove that the reflection of $A$ in the line $E F$ lies on the line $B C$.

Solution:
Let us consider the case when I lies inside of triangle EFD. For the other cases the proof is almost the same only with the slight difference.

We are going to prove that the intersection point of the circumcircles of $A E C$ and $A F B$ (denote it by $T$ ) lies on the line $B C$ and this point is the symmetric point of $A$ with respect to $E F$. First of all we prove that $A E I F$ is cyclic, which implies that $T$ lies on the line $B C$, because

$$
\angle A T B+\angle A T C=\angle A F B+\angle A E C=\angle A F I+\angle A E I=180^{\circ} .
$$

Denote by $N$ an intersection point of the lines $D F$ and $A C$. Of course $N$ is the symmetric point with respect to $C I$. Thus, $\angle I N A=\angle I D B$. Also,

$$
\angle I F D=\angle N D C-\angle I B C=90^{\circ}-\angle I C B-\angle I B C=\angle I A N .
$$

So, we get that $A, I, N$ and $F$ lie on a common circle. Therefore, we have $\angle A F I=\angle I N A=\angle I D B$. Analogously, $\angle A E I=\angle I D C$ and we have

$$
\angle A F I+\angle A E I=\angle I D B+\angle I D C
$$

So $\angle A F I+\angle A E I=180^{\circ}$, thus $A E I F$ is cyclic and $T$ lies on the line $B C$.



Because $E C$ bisects the angle $A C B$ and $A E T C$ is cyclic we get $E A=E T$. Because of the similar reasons we have $F A=F T$. Therefore $T$ is the symmetric point of $A$ with respect to the line $E F$ and it lies on the line $B C$.

<img_3495>

# Solution 2. 

Like to the first solution, consider the case when I lies inside of triangle EFD. we need to prove that $A E I F$ is cyclic. The finish of the proof is the same.

<img_3238>

first note that $\triangle F D B \sim \triangle A I B$, because $\angle F B D=\angle A B I$, and

$$
\angle B F D=\angle F D C-\angle I B C=90^{\circ}-\angle I C D-\angle I B C=\angle I A B .
$$

Because of the similarity we have $\frac{A B}{A F}=\frac{B I}{B D}$. This equality of the length ratios with $\angle I B D=\angle A B F$ implies that $\triangle A B F \sim \triangle I B D$. Therefore, we have $\angle I D B=\angle A F B$. Analogously, we can get $\angle I D C=\angle A E C$, thus

$$
\angle A F I+\angle A E I=\angle I D B+\angle I D C=180^{\circ} .
$$

So, $A E I F$ is cyclic and we are done.
Subfield: Geometry


Question: A plane has a special point $O$ called the origin. Let $P$ be a set of 2021 points in the plane, such that

(i) no three points in $P$ lie on a line and

(ii) no two points in $P$ lie on a line through the origin.

A triangle with vertices in $P$ is $f a t$, if $O$ is strictly inside the triangle. Find the maximum number of fat triangles.

Solution:
We will count minimal number of triangles that are not fat. Let $F$ set of fat triangles, and $\mathrm{S}$ set of triangles that are not fat. If triangle $X Y Z \in S$, we call $X$ and $Z$ good vertices if $O Y$ is located between $O X$ and $O Z$. For $A \in P$ let $S_{A} \subseteq S$ be set of triangles in $S$ for which $A$ is one of the good vertex.

It is easy to see that

$$
2|S|=\sum_{A \in P}\left|S_{A}\right| \tag{1}
$$



For $A \in P$, let $R_{A} \subset P$ and $L_{A} \subset P$ be parts of $P \backslash\{A\}$ divided by $A O$. Suppose for $A X Y \in S$ vertex $A$ is good, then clearly $X, Y \in R_{A}$ or $X, Y \in L_{A}$. On the other hand, if $X, Y \in R_{A}$ or $X, Y \in L_{A}$ then clearly $A X Y \in S$ and $A$ is its good vertex. Therefore,

$$
\left|S_{A}\right|=\left(\begin{array}{c}
\left|R_{A}\right| \\
2
\end{array}\right)+\left(\begin{array}{c}
\left|L_{A}\right| \\
2
\end{array}\right) \tag{2}
$$

It is easy to show following identity:

$$
\frac{x(x-1)}{2}+\frac{y(y-1)}{2}-2 \cdot \frac{\frac{x+y}{2}\left(\frac{x+y}{2}-1\right)}{2}=\frac{(x-y)^{2}}{4} \tag{3}
$$

By using (2) and (3) we get

$$
\left|S_{A}\right| \geq 2 \cdot\left(\begin{array}{c}
\frac{\left|R_{A}\right|+\left|L_{A}\right|}{2} \\
2
\end{array}\right)=2 \cdot\left(\begin{array}{c}
1010 \\
2
\end{array}\right)=1010 \cdot 1009 \tag{4}
$$

and the equality holds when $\left|R_{A}\right|=\left|L_{A}\right|=1010$. Hence

$$
|S|=\frac{\sum_{A \in P}\left|S_{A}\right|}{2} \geq \frac{2021 \cdot 1010 \cdot 1009}{2}=2021 \cdot 505 \cdot 1009 \tag{5}
$$

Therefore,

$$
|F|=\left(\begin{array}{c}
2021 \\
3
\end{array}\right)-|S| \leq 2021 \cdot 1010 \cdot 673-2021 \cdot 505 \cdot 1009=2021 \cdot 505 \cdot 337 \tag{6}
$$

For configuration of points on regular 2021-gon which is centered at $O$, inequalities in (4), (5), (6) become equalities. Hence $2021 \cdot 505 \cdot 337$ is indeed the answer.

Final answer: $2021 \cdot 505 \cdot 337$