Find the lengths of the legs of a right triangle if it is known that the sum of the lengths is 23 cm, and the area of the triangle is 60 cm^2.