406793: GYM102556 I Riana and the Illuminous Triangles
Description
Riana always wanted to join the secret order of the ProgVar. Most people doubt its existence, believing it to be just a myth propagated by paranoid conspiracy theorists. However, some, including Riana, know the truth: ProgVar is an immensely influential organization working behind the scenes to control the world at large.
The all-knowing ProgVar, of course, is aware of her intent. One day, she received an initiation parchment. The parchment contains a geometric graph of $$$n$$$ points, no three of which are collinear. Riana knows that ProgVar is obsessed with triangles, and that she may form a triangle from any three of the $$$n$$$ points.
To demonstrate her commitment to joining the order, she must count how many ways there are of forming two triangles such that one triangle lies entirely within the other. In particular, these two triangles must not share a vertex. Two ways of forming triangles are considered distinct if there is a point that is used as a triangle vertex in one way but not in the other way.
Riana, of course, is a capable follower, and she sent her answers to the order in less than two seconds. ProgVar, busy with more important world affairs, has outsourced the task of checking her answers to you. How many such ways of forming two triangles are there?
InputThe first line contains the number of points $$$n \leq 300$$$.
The next $$$n$$$ lines each contains two integers $$$x$$$ and $$$y$$$, where the $$$i$$$th line denotes that the $$$i$$$th point is $$$(x, y)$$$.
The absolute values of the coordinates of each point are guaranteed not to exceed $$$10^4$$$.
OutputPrint how many such ways there are of forming two triangles that satisfy the problem.
Note that the answer may exceed $$$10^{10}$$$.
ExamplesInput7 1 1 1 -1 -1 -1 -1 1 4 -2 -4 -2 0 3Output
4Input
8 3 0 2 2 0 3 -2 2 -3 0 -2 -2 0 -3 2 -2Output
0Input
15 -691 -45 -5993 -7095 4994 -4998 6585 6740 -3726 -241 -8489 -1030 -3261 3284 -2295 -2242 5985 -5838 -7843 -8290 -6834 278 3974 2002 -9268 6063 5698 6962 5664 -6676Output
307Note
It may also be shown that there are no other pairs of triangles that satisfy the problem conditions. Therefore, the answer for the first test case is $$$4$$$.