eolymp
bolt
Try our new interface for solving problems
Problems

Distance from the point

Distance from the point

Time limit 1 second
Memory limit 122 MiB

Three points A, B` and C are given.

Find the distance from point C to the line, ray and segment, formed with points A and B.

Input data

First line contains two integers - the coordinates of point C. Next two lines in the same format contains points A and B (AB). All input integers are not greater than 10000.

Output data

In the first line print one real number - the distance from point C to the line. In the next two lines print the distance from the ray AB (A is the ray starting point) and from the segment AB. Print all numbers with accuracy not greater than 10^(-6). The ray is directed from point A to point B.

Examples

Input example #1
3 0
1 1
2 1
Output example #1
1.000000000
1.000000000
1.414213562