Voronoi Diagram Again
시간 제한5초메모리 제한1024 MB
N개의 점이 주어질 때 맨해튼 거리 기준 보로노이 다이어그램에서 무한 영역의 개수를 구한다. 좌표를 변환한 뒤 볼록 껍질 위에 놓인 점의 수를 세면 된다.
문제

In the 2-dimensional Cartesian coordinate system, we define the Voronoi Diagram of a non-empty set of points , as a diagram that divides the plane by the criteria ``which point in the set is closest in this location?". More precisely, the Voronoi diagram of a given non-empty point set is a collection of \textbf{regions}: A point is included in region if and only if holds for all .
While the usual Voronoi Diagram uses Euclidean distance, we use Manhattan distance in this problem. denotes the \textbf{Manhattan} distance between point and . Manhattan distance between two points is the sum of the absolute differences of their , coordinates. Thus, the Manhattan distance between two points , can be written as .
For example, in the picture above, every location over the plane is colored by the closest point with such location. The points which belongs to a single region is colored by a light color indicating a region, and the points which belongs to more than one region forms lines and points colored black.
The region is unbounded if for any real number , there exists point in the region such that where is the origin. You have to find the number of unbounded regions in the Voronoi Diagram.
입력
In the first line, the number of points consisting Voronoi diagram is given.
In the -th line of next lines, two integers indicating and coordinate of are given. These are the points in the Voronoi diagram.
출력
Print a single integer, denoting the number of unbounded regions in the Voronoi Diagram.
제한
- ()
- All points are distinct.
힌트
In example 2, overlapping region is indicated as subtractive mixing of two or more colors. All points with is included in all five region, and colored as darkest.