Quadrants
시간 제한2초메모리 제한2048 MB
일반 위치에 있는 n개의 점이 주어질 때, 경계에 P의 점이 정확히 세 개 있고 내부에 정확히 k개의 점이 있는, 두 수직선으로 정의되는 사분면의 개수를 모든 k에 대해 센다.
문제
This problem is about quadrants. What are quadrants? Let us begin with any two perpendicular lines and in the plane . If you subtract the two lines and from the whole plane , you obtain four connected, unbounded regions. Each of the four regions is called a quadrant. Note that the boundary of a quadrant does not belong to itself.
Now, consider a set of points in the plane . We are interested in quadrants defined by the set of points. Specifically, let be the set of quadrants such that the boundary of contains exactly three points of . Each quadrant is called a -quadrant if contains exactly points of in its interior. The figure below shows an example in which the set consists of points (small circles) and you can see a -quadrant (shaded in cyan), whose boundary contains three points .

Given a set of points as input, write a program that computes the number of -quadrants for every .
입력
Your program is to read from standard input. The input starts with a line containing a single integer (), where is the number of points in the input set . In each of the following lines, given are two integers and , both ranging from to , inclusively, that represent the - and -coordinates of an input point in . You may assume that no two input points have the same coordinates, that there are no three points in lying in a line, and that there are no two perpendicular lines and in the plane such that and .
출력
Your program is to write to standard output. Print exactly lines. The -th line of your output for each must contain a single integer that represents the number of -quadrants with respect to the input set of points.