A circle is circumscribed around a right triangle $A B C$. The distances from the ends of the hypotenuse $A B$ to the line tangent to the circle at point $C$ are $m$ and $n$ respectively. Find the legs $A C$ and $B C$.
Let $P$ and $Q$ be the projections of points $A$ and $B$ onto the given tangent, and $CM$ be the altitude of triangle $ABC$. Triangle $AMC$ is congruent to triangle $APC$, since

$$
\angle PCA = \angle ABC = 90^{\circ} - \angle CAB = \angle ACM
$$

(by the theorem on the angle between a tangent and a chord). Therefore, $AM = AP = m$. Similarly, $BM = n$. Hence,

$$
AC^2 = AM \cdot AB = m(m+n), \quad BC^2 = BM \cdot AB = n(m+n),
$$

## Answer

$\sqrt{m(m+n)}, \sqrt{n(m+n)}$.