What part of a line is in a circle?
There is a circle (specified by its radius and center coordinates) and a line (defined by the coordinates of two distinct points on it).
Determine the length of the segment of the line that lies within the circle.
Input
The input should be read from standard input (keyboard). The first line contains three integers: the radius of the circle R, followed by the coordinates of its center C_x and C_y. The second and third lines each contain two integers representing the x- and y-coordinates of two distinct points through which the line passes. All integers have absolute values not exceeding 10000.
Output
Output a single number: if the line intersects the circle at one or more points, output the length of the segment of the line that lies inside the circle. If the line does not intersect the circle, output -1. If the line is tangent to the circle, meaning it touches the circle at exactly one point, output 0 since there is no segment of non-zero length within the circle.
The result should be output without rounding, and it may be presented in exponential form, such as 6.0000000000000000E+0000 instead of 6.