Big jumps
In one very large city unusual racing suit. From normal seeds, they differ in that are not on the racetrack, and a specially harvested track. She represents the infinite line in the plane.
The track is very long, so the competition can be drawn is not on the same day and place not only during the day but at night. Organizers think deeply about how they will cover the route, because to cover an infinitely long track is not so simple. To this end they have bought N floodlights will be installed at certain points in the city. It is known that the floodlights illuminate the ground, forming a circle.
It so happened that the company that installed equipment, confused the installation site, so some floodlights may not even cover the route. Now the competition can fail, the organizers are very concerned that viewers will not see the most interesting moments of the competition due to an error of masters. Help the organizers to find out what the length of the illuminated side of the road.
Input
The first line contains four numbers x_1, y_1, x_2, y_2 — coordinates of two points on the line. In the second - row number N (1 ≤ N ≤ 100000) — the number of fixtures. In each of the next N lines are given 3 numbers x, y and R, the coordinates and radius of the circle formed by the searchlights.
All coordinates and radii - integers not exceeding modulo 10^5.
Output
The output file output the answer to the problem, up to 10^{−4}.