403553: GYM101193 D Brand registration

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Brand registrationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Flash was born in the mid-1920s. Soon he will turn 100 years old, and according to the Justice League rules the superhero will have to resign and retire.

But even superheroes need to earn a living, so Flash has decided to register his brand to get paid for its licensing. Flash’s logo is an integral part of his brand. The logo looks like a polygonal chain on six vertices. When traversing the chain the segments turns alternate (first left turn, then right turn, then left, and so on) and the turns are sharp, i.e. greater than . Such polygonal chain looks like a flash.

The universe is represented by n points, each point represents a planet. According to the new law of the Interstellar Government every superhero can receive income of one space dollar per day if there are planets which could be connected with straight lines to represent the hero’s logo. Note that Flash could use planets multiple times to receive income from different logo configurations. Configurations are considered to be different if their planet order is different. Configurations that have reverse order are considered to be the same.

Flash has spent his whole life as a superhero, so he is not good at math. He would like to know how many space dollars would he earn per day if he registers his brand.

Input

The first input line has a single positive integer number n, which is the number of planets in the universe. Following that are n lines each containing two integer numbers xi and yi, which represent coordinates of the i-th planet. The universe is finite and flat, but it is somewhat unique: no three planets are located along the same line.

6 ≤ n ≤ 1000
|xi|, |yi| ≤ 1000
Output

The only output line should contain Flash’s daily income in space dollars.

ExamplesInput
6
0 3
-1 2
1 1
-2 0
1 -1
-1 -2
Output
3
Input
7
0 -5
-4 3
-5 8
4 0
-8 4
-1 1
2 5
Output
42

加入题单

算法标签: