A Place for the Capital
Prince George Longlegs of ancient Byte-Land, during his campaign, stumbled upon a vast flat field with a peculiar anomaly: movement across this field is only possible along straight lines that pass through a fixed point (K), or along circles centered at this same point.
Attempts to move along any other paths were unsuccessful.
Intrigued by this phenomenon, the prince decided to establish a city at this location, which eventually became the capital of Byterussia, with point (K) serving as the central reference for all the roads in the principality.
However, before proceeding, he contemplated: what is the minimum distance he would need to travel across the field from a given point (A) to a given point (B)?
During the journey, one can switch trajectories at any time, moving along another arc or radius that passes through the given point.
The total distance traveled is the sum of the distances covered on each radial or circular segment.
Input
The first line of input contains four integers: the coordinates of point (A) ((x_A) and (y_A)), followed by the coordinates of point (B) ((x_B) and (y_B)).
Point (K) is located at the origin.
All coordinates are integers, with absolute values not exceeding (10^6).
Output
Output a single number - the minimum distance Prince George needs to travel from point (A) to point (B).
The answer is considered correct if the absolute or relative error does not exceed (10^-6).