does the pythagorean theorem hold for shapes other than squares constructed on the legs and hypotenuse of a right triagles