Find the distance from a given point to a given beam.
Six integers not exceeding modulo 10000, - coordinates of the point and the coordinates of the beginning and end of the vector.
One number - the distance from the point to the beam, defined by a vector, to within 10^{-6}.