Four. (20 points) As shown in Figure 5, in the right triangle $\triangle ABC$, $CA > CB, \angle C = 90^{\circ}$, quadrilaterals $CDEF$ and $KLMN$ are two inscribed squares in $\triangle ABC$. It is known that $S_{\text{CDEF}} = 441, S_{KLMN} = 440$. Find the lengths of the three sides of $\triangle ABC$.

---

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
Let the side length of square $CDEF$ be $x$, and the side length of square $KLMN$ be $y$. According to the problem, $x=21, y=2\sqrt{110}$.
Let $BC=a, CA=b, AB=c$, then $a^2 + b^2 = c^2$.
Notice that
$$
a x + b x = 2\left(S_{\triangle CKB} + S_{\triangle CM}\right) = 2 S_{\triangle ABC} = a b,
$$

Thus, $x = \frac{a b}{a + b}$.
Also, from $\triangle AKL \sim \triangle ABC$, we get $AL = \frac{b}{a} y$.
Similarly, $MB = \frac{a}{b} y$.
Since $c = AL + LM + MB$
$$
= \left(\frac{b}{a} + 1 + \frac{a}{b}\right) x = \frac{c^2 + ab}{ab} y,
$$

Therefore, $y = \frac{abc}{c^2 + ab}$.
Then $\frac{1}{y^2} - \frac{1}{x^2} = \left(\frac{1}{c} + \frac{c}{ab}\right)^2 - \left(\frac{1}{a} + \frac{1}{b}\right)^2$
$$
= \left(\frac{1}{c^2} + \frac{2}{ab} + \frac{c^2}{a^2 b^2}\right) - \left(\frac{1}{a^2} + \frac{2}{ab} + \frac{1}{b^2}\right) = \frac{1}{c^2}.
$$

Thus, $c = \frac{1}{\sqrt{\frac{1}{440} - \frac{1}{441}}} = 21 \sqrt{440} = 42 \sqrt{110}$.
Substituting this into equation (2) yields
$$
ab = \frac{c^2 y}{c - y} = 21^2 \times 22.
$$

Furthermore, $a + b = \frac{ab}{x} = 21 \times 22$.
Therefore, $a$ and $b$ are the roots of the quadratic equation $t^2 - 21 \times 22 t + 21^2 \times 22 = 0$.
Since $b > a$, we have
$$
a = 231 - 63 \sqrt{11}, b = 231 + 63 \sqrt{11}.
$$
(Proposed by Ben Dayuan, Shuo Daolu, Liu Hongkun, Zeng Rong, and Ye Shengyang)