import math class Point: #定义一个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 calculate_abc(self): #定义直线类中计算直线A,B,C的函数 a=self.point_a.y-self.point_b.y b=self.point_b.x-self.point_a.x c=-(a*self.point_a.x+b*self.point_a.y) return (a,b,c) def get_distance(point,line): #定义计算点到直线的函数 a,b,c=line.calculate_abc() numerator=abs(a*point.x+b*point.y+c) denominator=math.sqrt(a**2+b**2) return numerator/denominator 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()