Rectangles

This problem has no story. You just have to find the common area of all rectangles. Input The first line contains integer N (1 ≤ N ≤ 1000). It is the number of tests. Each test described by number of rectangles M (1 ≤ M ≤ 30). Next N lines contain 4 integers: X1 Y1 X2 Y2 (−10000 ≤ X1;Y2;X2;Y2 ≤ 10000). Each rectangle is described by 2 points: lower left and upper right corners. All rectangle sides are parallel to Ox or Oy axes. Output For each test case out line formatter like this: ‘Case i: a’. Where i is a test number, and a is an area that belongs to all rectangles. Sample Input 1 4 0 0 10 10 -1 -1 2 2 -10 0 2 100 -10 -10 10 10 Sample Output Case 1: 4