There are n rectangles on the coordinate plane, with sides parallel to the coordinate axis. The i-th rectangle covers all points (x,y) with l_i≤x≤r_i and d_i≤y≤u_i.
For simplicity, for every i=j, we have l_i=l_j, r_i=r_j, l_i=r_j, d_i=d_j, u_i=u_j, d_i=u_j.
Count the number of triples (i,j,k) with 1≤i<j<k≤n for which i-th, j-th, and k-th rectangles are pairwise disjoint (every pair of them has no common points).
The first line of the input contains a single integer n (1≤n≤2⋅105), the number of rectangles.
The i-th of the next n lines contains four integers describing the i-th rectangle: l_i, r_i, d_i, u_i (−109≤l_i<r_i≤109, −109≤d_i<u_i≤109).
It is guaranteed that, for every i=j, we have l_i=l_j, r_i=r_j, l_i=r_j, d_i=d_j, u_i=u_j, d_i=u_j.
Output the number of triples (i,j,k) with 1≤i<j<k≤n for which i-th, j-th, and k-th rectangles are pairwise disjoint.