from math import sqrt
class point:
def __init__(self, x, y):
self.x = x
self.y = y
def dist(self, p):
return sqrt((self.x - p.x) * (self.x - p.x) + (self.y - p.y) * (self.y - p.y))
class circle:
def __init__(self, o, r):
self.o = o
self.r = r
def intersect(self, c):
res = []
#(x - o.x)^2 + (y - o.y)^2 = r^2
#(x - c.o.x)^2 + (y - c.o.y)^2 = c.r^2
#2x(c.o.x - o.x) + 2y(c.o.y - o.y) + (o.x^2 + o.y^2 - c.o.x^2 - c.o.y^2) = r^2 - c.r^2
sw = False
if abs(c.o.y - self.o.y) < 1e-9:
swap(self.o.x, self.o.y)
swap(c.o.x, c.o.y)
sw = True
#y = ax + b;
a = -(c.o.x - self.o.x) / (c.o.y - self.o.y)
b = (self.r * self.r - self.o.x * self.o.x - self.o.y * self.o.y - c.r * c.r + c.o.x * c.o.x + c.o.y * c.o.y) / (2 * c.o.y - 2 * self.o.y)
#(x - o.x)^2 + (ax + b - o.y)^2 = r^2
#Ax^2 + Bx + C = 0
A = 1 + a * a
B = -2 * self.o.x + 2 * (b - self.o.y) * a
C = self.o.x * self.o.x + (b - self.o.y) * (b - self.o.y) - self.r * self.r;
D = B * B - 4 * A * C
if sw:
swap(self.o.x, self.o.y)
swap(c.o.x, c.o.y)
if D < 0:
return res
x1 = (-B - sqrt(D)) / (2 * A)
x2 = (-B + sqrt(D)) / (2 * A)
y1 = a * x1 + b
y2 = a * x2 + b
if sw:
swap(x1, y1)
swap(x2, y2)
p1 = point(x1, y1)
p2 = point(x2, y2)
res.append(p1)
res.append(p2)
return res
def inside(self, p):
return self.o.dist(p) <= self.r
O = [circle(point(0, 0), 0) for i in range(3)]
P = [point(0, 0) for i in range(3)]
def has_intersection():
for i in range(3):
pts = O[i].intersect(O[(i + 1) % 3])
for p in pts:
if O[(i + 2) % 3].inside(p):
return True
if O[(i + 1) % 3].inside(O[i].o) and O[(i + 2) % 3].inside(O[i].o):
return True
return False
def ok(R):
for i in range(3):
O[i] = circle(P[i], 3 * R)
for i in range(3):
O[i].r = R
if has_intersection():
return True
O[i].r = 3 * R
for i in range(3):
O[i].r = R
for i in range(3):
O[i].r = 5 * R
if has_intersection():
return True
O[i].r = R
return False
for i in range(3):
x, y = map(int, input().split())
P[i] = point(x, y)
l = 0
r = 4747
for i in range(100):
m = (l + r) / 2
if ok(m):
r = m
else:
l = m
print(r)