Олимпиадный тренинг

Задача 38660. Distance from point to beam


Input
Six numbers – coordinates of the point and coordinates of the beginning and end of the vector.

Imprint
One number – distance from a point to a ray defined by a vector.
 
Examples
# Input Output
1 2 3 0 0 4 0 3.00000
2 -1 1 0 0 4 0 1.41421