Types: n: int, rectangles: List[Tuple[int, int, int, int]]
Ranges: 1 ≤ n ≤ 50, 0 ≤ li < ri ≤ 10^6, 0 ≤ bi < ti ≤ 10^6, for 1 ≤ i ≤ n
Addtl Info: Input is terminated by a single zero.