0310 Landscape-Portrait Rectangle

A landscape-portrait (LP) rectangle consist of a rectangle in portrait orientation (standing on the short edge of rectangle) and similar rectangle in landscape orientation (standing on the long edge of the rectangle). If the component rectangle has proportion 1:sqrt(i), we can cut i+1 LP rectangles whose sides are in the proportion 1:sqrt(i).