A news story that made the whole country laugh automatically becomes a good one.
The residents of Krilandia love carrot juice. Knowing this, the government of Berlandia decided to route its main carrot juice pipeline—which supplies a delicious juice with a hint of pine to other countries—so that it bypasses Krilandia.
However, the clever Kriliks have decided to secretly tap into the pipeline at one of the vertices of the polygon that defines their country's borders. Naturally, they want to lay this hidden pipe at night, as quickly as possible, so the distance to the connection point should be minimized.
To quickly realize their delicious carrot juice plans, the citizens of Krilandia need your help to write a program that calculates the minimum distance to the desired point of connection.
The first line contains numbers—the coordinates of two points through which the Berlandian pipeline passes: X_1, Y_1, X_2, Y_2. Then follows the number of vertices (3 \le n \le 1000) of the polygon that defines the territory of Krilandia, followed by the coordinates of these vertices X_i, Y_i (1 \le i \le n). All coordinates are integers and do not exceed 10^9 in absolute value. Numbers are separated by spaces and/or newlines. It is guaranteed that the Berlandian pipeline does not cross Krilandia's territory and that Krilandia's territory has a non-zero area.
Print a single real number—the shortest distance to the most likely connection point—with a precision of at least decimal places.
Example 1