For the quadrilateral ABCD, E and F are midpoints of sides AD and BC respectively. AB = 15, BC = 29, CD = 34, AD = 11, and
EF = 31. Find the distance between midpoints of the other two sides, if the diagonals of the quadrilateral are perpendicular.