Converse of the pythagorean theorem