One leg of a right triangle is 28 inches longer than the other leg, and the hypotenuse is 52 inches. Find the lengths of the legs of the triangle.

The lengths of the legs are