Four Congruent Circles and an Inscribed Square

A set of four congruent circles whose centers form a square is inscribed in a right triangle ABC where C is the right angle and serves as one corner of the square.  Find their radius in terms of the sides a, b, c, of the triangle. (Japan, Edo Period, 1603-1867)