The two legs of a right triangle are equal and the square of its hypotenuse is 50 cm. Find the length of each leg.