Let ABCD be a rectangle. Points X and Y lie on side AB, points Z and W lie on side CD, and points P and Q lie inside the rectangle, such that XYQP and PQZW are trapezoids. Suppose that pentagons AXPWD and BYQZC and trapezoids XYQP and PQZW have the same area, and that XY=YB+BC+CZ=ZW=WD+DA+AX. Find AB if BC=19 and PQ=87.

(第五届AIME1987 第6题)