124. Find all right-angled triangles where the lengths of the sides are integers, and the perimeter of each is numerically equal to the area.
Solution. Let $x, y$ be the lengths of the legs of the triangle satisfying the condition of the problem. Then $x y=2\left(x+y+\sqrt{x^{2}+y^{2}}\right)$, or $-2 \sqrt{x^{2}+y^{2}}=2(x+y)-x y$. After squaring and subsequent simplifications, we get:

$$
(x-4) y=4 x-8=4(x-4)+8
$$

From the obtained equality, it follows that $4 x-8=4(x-4)+8$ is divisible by $x-4$, and then 8 is divisible by $x-4$. Therefore, $x-4 \in\{ \pm 1, \pm 2, \pm 4, \pm 8\}, x \in\{5,6,8,12,3,2\}$

Of these values of $x$, only the first 4 lead to a solution of the problem, and two of them correspond to equal triangles. Ultimately, we get that the condition of the problem is satisfied only by triangles with sides $5,12,13$ and $6,8,10$.