The problem is simple (Well, simple to understand at the least).
You are given n lines of the form ax+by+c=0. Moreover, no 3 lines pass through the same point. You have to find the number of triangles that can be formed using these lines.
Input
First line of input contains N - number of lines. N lines follow, each line contains three integers a, b and c corresponding to the formula of ith line. Moreover, a and b will not be simultaneously 0 for a line.
Output
Output a single integer corresponding to the number of triangles formed by these n lines.
Constraints
1<=N<=300000
|a|,|b|,|c|<=109
Setter : Karan Thakkar