Limak is a little polar bear, who isn't afraid of geometry. He has n 2-dimensional non-zero vectors →a1,→a2,…,→an, each described by two integers xi,yi. Show him that you can count ways to choose an ordered triple of distinct indices i,j,k satisfying the two conditions:
If you don't know vectors (so you don't understand what is written above) then you can use the following three conditions, equivalent to those given above:
The first line contains one integer n — the number of vectors.
The i-th of next n lines contains two integers xi,yi — coordinates of →ai.
Some of n vectors may be equal to each other but none of them is equal to →(0,0).
In one line print the number of ordered triples of distinct indices i,j,k satisfying the given conditions.
Extra constraints | Points | Which tests |
---|---|---|
n≤50 | 20 | 1-4 and 9-10 |
no extra constraints | 80 | 5-8 and 11-27 |
There are n=5 vectors in the sample test. Note that some of them may be equal. There are 4 ways to choose a triple of indices: