On the map of Antarctica, polar stations are shown as dots, each with integer coordinates on a rectangular grid. A transition between two stations is possible if their distance in a straight line is less than two unit segments on the map. Stations that are directly or indirectly connected are united into a land. Each station belongs to only one land.
Determine the number of arctic lands.
The first line contains the number of stations. Each of the next lines contains two numbers, the coordinates of a station. All values are positive integers and do not exceed .
Print the number of lands.
Example 1