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 (with A measured in degrees) must be equal to the third digit after the decimal point of the decimal representation of cos A.

Here A is the angle of the triangle at Shureg's hole (the vertex from which he looks), i.e. the angle between the directions to the two other moles. The condition is that A is acute (0 < A < 90 degrees) and that floor(90 / A) equals the third digit after the decimal point of cos A; that is, floor(90 / A) = floor(1000 * cos A) mod 10. Note that since 0 < A < 90, the value floor(90 / A) is at least 1, so triplets with the third decimal digit of cos A equal to 0 never count.

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.

Input
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
Output one integer — the number of ways.

Example(s)
sample input
sample output
10
628 1
17 207
176 1
16 -5
161 0
-1 56
17 83
1 5
15 1
18 101
15
