Rectangleland is a very old city that has kept several historical treasures. The city was planned many decades ago, with all the roads going north-south or east-west. At the moment, there is a project to revitalize the city, which plans to build a new rectan- gular park. The public administration will choose the location of the park and for the moment they are interested in the possible locations for the park, considering that it needs to be aligned to the roads. That is, when is visualized in a map, the borders of the park should be horizontal or vertical. With the objective of preserving the historical treasures when building the park, some restrictions must be obeyed. In the city there are some lampposts from the XIX century. Given their historical value, no lamppost must be removed during the construction of the new park. Due to natural decay and bad maintenance, few historical lampposts remain, and no road has more than one. No historical lamppost should be inside the park. On the other hand, the landscape project plans to have two historic lampposts in two corners of the park. The figure below shows an example of four historic lampposts and the three possible locations for the park. The city hall hired a georeference company to map the lampposts positions. With this data at hand, the next step is to determine how many possible locations exist for the park, so the size of the teams necessary to evaluate each location can be estimated. Input The input contains several test cases. The first line a test case contains an integer number N, 1 ≤ N ≤ 3000, which represents the number of historical lampposts. The next N lines will describe, each, the position of a lamppost. A position of a lamppost is given by a pair of integer numbers, X and Y , −108 ≤ X, Y ≤ 108, corresponding to the plane coordinates. Output For each test case in the input your program must produce one single line containing the number of different possible locations for the park. Sample Input 4 17 43 34 91 5 17 55 22 88 6 -1
2/2 8 11 22 -2 200 100 3 -6 -6 -51 19 -3 -1 8 -2 Sample Output 3 8 19