440. Moles and Holes

Time limit per test: 2.25 second(s)
Memory limit: 262144 kilobytes
input: standard
output: standard

N moles live in the cottage of Mr. Tapacob. Every mole lives in its own hole. And Mr. Tapacob is not glad to see them. So he forced them out. But there are three strongest moles, who don't want to leave. They are Shureg, Ruslan and Ruslan. And you should not distinguish Ruslans. Sometimes these three moles poke out of holes to look around. But only one of them, the strangest mole (Shureg), is not blind. And when they peek out from hole, Shureg looks at two other moles. But he is a mole and his vision is strange, therefore he can't see in any angle. The angle between two other moles (let's call it A) must be sharp, and an integer part of value 90 / A (in degrees) must be equal to the third digit after decimal point of decimal representation of .

You are given coordinates of holes. Mr. Tapacob wants to know how many ways are there for moles to peek out from holes such that Shureg can see two other moles. Any mole can get out at any of the holes, but the three holes which they get from must be all different.

First line of input contains integer N (3 ≤ N ≤ 800). Next N lines contain coordinates of holes; each line consists of two integers separated by a space. Coordinates do not exceed 1000 by absolute value. No two holes coincide.

Output one integer — the number of ways.

sample input
sample output
628 1
17 207
176 1
16 -5
161 0
-1 56
17 83
1 5
15 1
18 101

Online Contester Team © 2002 - 2010. All rights reserved.