A brace for a shelf has the shape of a right triangle. Its hypotenuse is 16 inches long and the two legs are equal in length. How long are the legs of the triangle?