Prove that for each prime $p>2$ there exists exactly one positive integer $n$, such that $n^2+np$ is a perfect square.
2017 Poland - Second Round
Day 1
In an acute triangle $ABC$ the bisector of $\angle BAC$ crosses $BC$ at $D$. Points $P$ and $Q$ are orthogonal projections of $D$ on lines $AB$ and $AC$. Prove that $[APQ]=[BCQP]$ if and only if the circumcenter of $ABC$ lies on $PQ$.
Let $x_1 \le x_2 \le \ldots \le x_{2n-1}$ be real numbers whose arithmetic mean equals $A$. Prove that $$2\sum_{i=1}^{2n-1}\left( x_{i}-A\right)^2 \ge \sum_{i=1}^{2n-1}\left( x_{i}-x_{n}\right)^2.$$
Day 2
Incircle of a triangle $ABC$ touches $AB$ and $AC$ at $D$ and $E$, respectively. Point $J$ is the excenter of $A$. Points $M$ and $N$ are midpoints of $JD$ and $JE$. Lines $BM$ and $CN$ cross at point $P$. Prove that $P$ lies on the circumcircle of $ABC$.
Gourmet Jan compared $n$ restaurants ($n$ is a positive integer). Each pair of restaurants was compared in two categories: tastiness of food and quality of service. For some pairs Jan couldn't tell which restaurant was better in one category, but never in two categories. Moreover, if Jan thought restaurant $A$ was better than restaurant $B$ in one category and restaurant $B$ was better than restaurant $C$ in the same category, then $A$ is also better than $C$ in that category. Prove there exists a restaurant $R$ such that every other restaurant is worse than $R$ in at least one category.
A prime number $p > 2$ and $x,y \in \left\{ 1,2,\ldots, \frac{p-1}{2} \right\}$ are given. Prove that if $x\left( p-x\right)y\left( p-y\right)$ is a perfect square, then $x = y$.