Consider a featureless, flat patch of desert as the Cartesian plane. On it stand several research stations, each located at a point $(x, y)$ where both $x$ and $y$ are even integers. For security, you must build walls that are sufficiently long and high to separate the stations so that no station is visible from any other station.
A wall may be built only along a North-South or an East-West line. A vertical (North-South) wall may be built at an odd $x$-coordinate, and a horizontal (East-West) wall may be built at an odd $y$-coordinate. Because the stations sit at even coordinates while the walls sit at odd coordinates, no wall ever touches a station. A wall is always long enough to completely separate the stations on one side of it from those on the other side.
Given the locations of the stations, determine the smallest number of walls that must be built. The segment joining any two stations must be crossed by at least one wall.
The input contains several test cases. Each test case begins with an integer $n$ ($2 \le n \le 100$), the number of stations. Each of the next $n$ lines contains two integers $x$ and $y$ ($0 \le x, y \le 36$), separated by a single space, giving the location $(x, y)$ of a station. Both $x$ and $y$ are always even. Within a test case all locations $(x, y)$ are distinct. The last test case is followed by a line containing a single $0$.
For each test case, output a single integer: the smallest number of walls that prevents the given $n$ stations from seeing one another. That is, the straight segment joining any two stations must be intersected by at least one wall. Print no extra spaces, and do not separate answers with blank lines.