One side of a right triangle is 8 cm shorter than the hypotenuse and 7 cm shorter than the third side. Find the lengths of the sides of the triangle.