how to find the sides of a rectangle given the diagonal