K. Kepler
time limit per test
3 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

In this strange planetary system that can be represented in a Cartesian plane, $$$N$$$ planets orbit circularly around a star at coordinates $$$(0, 0)$$$. The star is strictly contained within all circles that define the orbits, but the center of each orbit is not necessarily at coordinates $$$(0, 0)$$$. The circular orbits are in any position such that if two orbits intersect, then they intersect in two distinct points. In addition, three orbits do not intersect at a common point.

Scientist John Kepler is interested in testing a new theory and asked for your help to compute the number of intersection points between the orbits, if that number is less than or equal to $$$2N$$$. Otherwise, we just need to know that the number is greater than $$$2N$$$.

Input

The first line of the input contains an integer $$$N$$$ ($$$2 \leq N \leq 150000$$$), representing the number of orbits. Each of the following $$$N$$$ rows contains three real numbers with exactly 3 decimal digits, $$$X, Y$$$ ($$$−25.0 \leq X, Y \leq 25.0$$$) and $$$R$$$ ($$$1.0 \leq R \leq 200000.0$$$), the coordinates of the center and the radius of the orbit, respectively.

Output

Print a line containing an integer, representing the number of points of intersection between the orbits, if that number is less than or equal to $$$2N$$$. Otherwise, print greater.

Examples
Input
6
0.000 1.000 4.000
0.000 0.000 10.500
4.000 0.000 6.000
1.000 1.000 1.750
-1.000 -1.000 8.000
2.000 -2.000 4.000
Output
10
Input
4
-1.000 -1.000 3.000
1.000 -1.000 3.001
-3.004 3.003 5.002
1.000 1.000 3.005
Output
greater