You are given lines, their equations being in the coordinate plane. Calculate the number of triangles whose sides lie on the given lines. Since the result can be very large, output the number modulo .
A possible position of lines.
Important note: No three lines will intersect at the same point.
Input Specification
The first line of input contains the integer , the number of lines.
Each of the following lines contains three integers: , and , the numbers defining the line.
All numbers will have absolute value at most .
Output Specification
The first and only line of output must consist of the required number from the task.
Scoring
In test cases worth of total points, will be at most .
Sample Input 1
6
0 1 0
-5 3 0
-5 -2 25
0 1 -3
0 1 -2
-4 -5 29
Sample Output 1
10
Explanation for Sample Output 1
The example corresponds to the image in the task.
Sample Input 2
5
-5 3 0
-5 -3 -30
0 1 0
3 7 35
1 -2 -1
Sample Output 2
10
Comments