According to Wikipedia, the definition of rectangle is as follows: "In Euclidean plane geometry, a rectangle is a quadrilateral(四邊形) with four right angles(直角). It can also be defined as an equiangular quadrilateral, since equiangular means that all of its angles are equal (360°/4 = 90°)."
In this problem, you are asked to calculate the number of rectangle pairs that intersect to each other among a set of given rectangles. All rectangles are located in a 2-dimensional euclidean space(二維空間), and all their edges are parallel to either the X- or the Y-axis.
The first line contains one number N, where 2 <= N <= 128, standing for the number of given rectangles.
Each of the following N lines describes a rectangle and has 4 integers separated by space, representing
Notice that each of the 4 numbers is representable by an int type in C language.
The output should contain only one number, representing the number of rectangle pairs that intersect to each other.
Notice that if the area of overlapping part is zero, then the pair should NOT count.