M. Chavo's Barrel
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Chavo lives in a barrel on the street. The street can be seen as a 2D plane and has two streetlights located at points $$$p1$$$ and $$$p2$$$. These streetlights illuminate discs directly beneath them, which means they generate two discs $$$c1$$$ and $$$c2$$$ with centers at $$$p1$$$ and $$$p2$$$ respectively.

Chavo lived with his barrel of radius $$$0$$$ at the point $$$(0, 0)$$$ on the street, where the edge of the discs generated by the two streetlights intersect. In other words, this is where the edge of $$$c1$$$ intersects with the edge of $$$c2$$$.

Chavo is tired of his tiny home and wants to move to a larger barrel, where every point in his barrel is illuminated by both streetlights. However, Chavo is afraid of change, so he doesn't want any point in his barrel to be more than a distance of $$$R$$$ away from his original home.

Help Chavo by figuring out the largest radius of a barrel that can be illuminated by both streetlights and still remain entirely within a distance of $$$R$$$ from his original home.

Input

$$$0 \leq R \leq 10^6$$$, the maximum allowed distance from $$$(0, 0)$$$ to any point in the new barrel.

$$$-10^6 \leq p1.X, p1.Y \leq 10^6$$$, the coordinates of streetlight 1, $$$p1$$$.

$$$-10^6 \leq p2.X, p2.Y \leq 10^6$$$, the coordinates of streetlight 2, $$$p2$$$.

The radii of the discs $$$c1$$$ and $$$c2$$$ generated by the streetlights are such that the origin $$$(0, 0)$$$ lies on the edge of both discs.

Output

A single number, the radius of the largest barrel that can be illuminated by the two streetlights and still remain entirely within a distance of $$$R$$$ from the origin.

The relative and absolute error must be less than $$$10^{-6}$$$.

Examples
Input
6
3 0
0 3
Output
0.8786797
Input
2
3 4
4 -3
Output
0.7759225
Note

The following image represents the second test case. The circle with the dashed border has a radius of $$$R$$$, so the barrel needs to be entirely within it, as well as within the discs generated by $$$p1$$$ and $$$p2$$$.

Note that the discs $$$c1$$$ and $$$c2$$$ intersect at the origin.

Second testcase