eolymp
bolt
Try our new interface for solving problems
Problems

Circle and line

Circle and line

Time limit 1 second
Memory limit 128 MiB

There is a circle of radius R with center at (x, y) and the line that is given with the coordinates of its two points. Find the length of the line segment inside the circle.

Input data

One line contains radius of the circle R, the coordinates (x, y) of the circle center and coordinates of two points on the line. All numbers are integers, not greater than 10000 by absolute value.

Output data

Print the length of the line segment inside the circle with 5 digits after the decimal point. If the circle and the line do not intersect, print -1, if touches - print 0.

Examples

Input example #1
5 0 0 4 1 4 2 
Output example #1
6.00000
Source II этап Всеукраинской олимпиады школьников 2008-2009, г. Бердичев