Sanghyun is about to leave for military service and wants to throw a farewell party. He rents a venue for it, and the rental company is unusual because only former programmers work there.
Once Sanghyun picks the place he wants, the company builds N rectangles that cover that place completely. It then tells him the number of rectangles N and, for each rectangle, the coordinates of its bottom left corner and its top right corner. The N rectangles may overlap partially or completely. Every rectangle has sides parallel to the coordinate axes.
Write a program that computes the area of the venue Sanghyun rented, that is, the area of the region covered by at least one of the N rectangles.