Counting Triangles

Time Limit: 1000ms
Memory Limit: 32768KB
This problem will be judged on HDU. Original ID: 2655
64-bit integer IO format: %I64d      Java class name: Main

Description

There are many different points int xoy coordinate axes. Connect every two points with straight line. How many triangles can you find.

Input

There are many test cases. Please process to end of file. First of each test case is an integer N (3 <= N <= 1000). Then N line follows, each line contains one unique point X, Y (-10000000 <= X, Y <= 10000000).

Output

Print the number of triangles you can find.

Sample Input

3
0 0
1 1
2 2
3
0 0
1 0
1 1

Sample Output

0
1

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .