How Many Triangles

Time Limit: 10000/5000 MS (Java/Others)

Memory Limit: 65536/65536 K (Java/Others)

Description

Alice has n points in two-dimensional plane. She wants to know how many different acute triangles they can form. Two triangles are considered different if they differ in at least one point.

Input

The input contains multiple test cases.
For each test case, begin with an integer n,
next n lines each contains two integers $x_{i}$ and $y_{i}$.
$3 \leq n \leq 2000$
$0 \leq x_{i},y_{i} \leq 1e9$
Any two points will not coincide.

Output

For each test case output a line contains an integer.

Sample Input

3 1 1 2 2 2 3 3 1 1 2 3 3 2 4 1 1 3 1 4 1 2 3

Sample Output

0 1 2

Hint

wange2014

Source

2016 Multi-University Training Contest 5

提交代码