import math

class Point:
    def __init__(self, x, y):
        self.x = x
        self.y = y

class Line:
    def __init__(self, point_a, point_b):
        self.point_a = point_a
        self.point_b = point_b

def get_distance(P, L):
    x0,y0=P.x,P.y
    x1,y1=L.point_a.x,L.point_a.y
    x2,y2=L.point_b.x,L.point_b.y
    numerator = abs((x2 - x1) * (y1 - y0) - (x1 - x0) * (y2 - y1))
    
    # 计算分母:直线AB的长度(向量模长)
    denominator = math.hypot(x2 - x1, y2 - y1)
    
    # 处理直线AB为单点的特殊情况(避免除零)
    if denominator < 1e-9:
        return math.hypot(x0 - x1, y0 - y1)
    
    # 计算距离并返回
    return numerator / denominator

    # TODO: 计算点P到直线L的距离
    pass

































































































































































































def main():
    a, b = map(int, input().split())
    sx, sy, tx, ty = map(int, input().split())
    
    point_a = Point(sx, sy)
    point_b = Point(tx, ty)
    point_c = Point(a, b)
    line = Line(point_a, point_b)
    
    print("{:.2f}".format(get_distance(point_c, line)))

if __name__ == "__main__":
    main()