All-Ukrainian coverage#4551

All-Ukrainian coverage

0.5 seconds
32 megabytes
Medium

Traveling across Ukraine, our tourist enjoyed uninterrupted mobile service, thanks to his network operator's comprehensive coverage across the country. This coverage not only ensures a stable connection but also seems to have driven cockroaches away from homes near the transmitters.

Your task is to write a program that calculates how many times the mobile connection switches between different communication stations while traveling along a straight road segment from city to city . The connection always links to the station closest to the road segment. There are no points on the road that are equidistant from three or more stations, and no large sections of the road lie on the boundary of the coverage of two stations simultaneously. The distance between switching points is at least 10^{-4}.

Input

The first line of the input contains five integers separated by spaces: the number of stations (1 \leq N \leq 100), followed by the coordinates of the starting point X_1, Y_1, and the ending point X_2, Y_2. This is followed by lines, each containing two integers X_i, Y_i, separated by a space, representing the coordinates of the -th transceiver station. All coordinates are within the range of to . The minimum distance between switching points is .

Output

Output a single integer, representing the number of times the connection switches between stations along the specified straight road segment from city to city .

Examples

Example 1

Loading
Loading