atcoder#ABC224C. [ABC224C] Triangle?

[ABC224C] Triangle?

Score : 300300 points

Problem Statement

In the xyxy-plane, we have NN points numbered 11 through NN. Point ii is at the coordinates (Xi,Yi)(X_i,Y_i). Any two different points are at different positions. Find the number of ways to choose three of these NN points so that connecting the chosen points with segments results in a triangle with a positive area.

Constraints

  • All values in input are integers.
  • 3N3003 \le N \le 300
  • 109Xi,Yi109-10^9 \le X_i,Y_i \le 10^9
  • (Xi,Yi)(Xj,Yj)(X_i,Y_i) \neq (X_j,Y_j) if iji \neq j.

Input

Input is given from Standard Input in the following format:

NN

X1X_1 Y1Y_1

X2X_2 Y2Y_2

\dots

XNX_N YNY_N

Output

Print the answer as an integer.

4
0 1
1 3
1 1
-1 -1
3

The figure below illustrates the points.

There are three ways to choose points that form a triangle: {1,2,3},{1,3,4},{2,3,4}\{1,2,3\},\{1,3,4\},\{2,3,4\}.

20
224 433
987654321 987654321
2 0
6 4
314159265 358979323
0 0
-123456789 123456789
-1000000000 1000000000
124 233
9 -6
-4 0
9 5
-7 3
333333333 -333333333
-9 -1
7 -10
-1 5
324 633
1000000000 -1000000000
20 0
1124