All-Ukrainian coverage
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 A to city B. 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 N (1 ≤ N ≤ 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 N lines, each containing two integers X_i, Y_i, separated by a space, representing the coordinates of the i-th transceiver station. All coordinates are within the range of -1000 to 1000. The minimum distance between switching points is 0.0001.
Output
Output a single integer, representing the number of times the connection switches between stations along the specified straight road segment from city A to city B.