Tudor has decided to upload pictures of his goats to Instagram!
Tudor's goats are currently located at various lattice points in the -plane. To take pictures of his goats, Tudor will use a drone with a camera mounted on it. Tudor will send the drone to some point with and then take pictures of the goats from that location.
The camera that Tudor is using is a bit finicky - it can be set to focus on objects that are exactly units away, but when that happens, it can only take pictures of objects that are exactly units away. Since the location of the drone is fixed, if the camera needs to take a picture of an object that is a different distance away, it must be set to focus at the new distance.
The camera is smart enough to automatically take pictures of all objects of interest that are at its current focus distance. However, Tudor will need to manually instruct the camera on which distances to focus at. The camera initially has its focus distance set to zero.
Compute the minimum number of times Tudor will need to change the focus distance of the camera.
All goats are at distinct points.
There is no partial credit available for this problem.
The first line of input will contain a single positive integer, .
Each of the next lines contains two space-separated integers, and , indicating a goat is at .
Output, on a single line, the minimum number of times Tudor needs to focus the camera.
8 3 4 0 5 0 -5 5 0 -5 0 4 -3 3 -4 -4 3