eolymp
bolt
Try our new interface for solving problems
Problems

Moles and Holes

Moles and Holes

\textbf{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 \textbf{A}) must be sharp, and an integer part of value \textbf{90/A} (in degrees) must be equal to the third digit after decimal point of decimal representation of \textbf{cos(A)}. 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. \InputFile First line of input contains integer \textbf{N} (\textbf{3} ≤ \textbf{N} ≤ \textbf{800}). Next \textbf{N} lines contain coordinates of holes; each line consists of two integers separated by a space. Coordinates do not exceed \textbf{1000} by absolute value. No two holes coincide. \OutputFile Output one integer --- the number of ways.
Time limit 2.25 seconds
Memory limit 256 MiB
Input example #1
10
628 1
17 207
176 1
16 -5
161 0
-1 56
17 83
1 5
15 1
18 101
Output example #1
15
Source Izhevsk STU Contest, Petrozavodsk training camp, February 6, 2009