Problem

Source: Czech and Slovak Olympiad 2018, National Round, Problem 4

Tags: number theory, national olympiad



Let $a,b,c$ be integers which are lengths of sides of a triangle, $\gcd(a,b,c)=1$ and all the values $$\frac{a^2+b^2-c^2}{a+b-c},\quad\frac{b^2+c^2-a^2}{b+c-a},\quad\frac{c^2+a^2-b^2}{c+a-b}$$are integers as well. Show that $(a+b-c)(b+c-a)(c+a-b)$ or $2(a+b-c)(b+c-a)(c+a-b)$ is a perfect square.