A median of a quadrilateral connects the midpoint of one side of the quadrilateral to the midpoint of the opposite side of the quadrilateral. Show that the diagonals of a quadrilateral are perpendicular if and only if the medians of the quadrilateral are equal in length.