Voronoi Diagram Again
Time limit5sMemory limit1024 MB
Given N distinct integer points, count the Voronoi regions under Manhattan distance that are unbounded, where ties belong to every nearest point.
Problem
A Voronoi diagram of a non-empty point set divides the plane by the question of which point in is closest to a given location. More precisely, for a point set , a point belongs to region if and only if holds for all . The usual Voronoi diagram uses Euclidean distance, but this problem uses Manhattan distance. is the Manhattan distance between and , which is the sum of the absolute differences of their and coordinates. So the Manhattan distance between and is .

In the figure above, every location on the plane is colored by its closest point. Locations that belong to a single region have a light color, and locations that belong to more than one region form black lines and points.
A region is unbounded if, for any real number , there is a point in the region with , where is the origin. Find the number of unbounded regions in the Voronoi diagram.
Input
The first line contains , the number of points in the Voronoi diagram. Each of the next lines contains two integers and , the coordinates of point .
Output
Print a single integer, the number of unbounded regions in the Voronoi diagram.
Constraints
- ()
- All points are distinct.
Hint
In example 2, the overlapping area is shown as a subtractive mix of two or more colors. Every point with belongs to all five regions, so it is colored darkest.