#include using namespace std; #define ld long double #define ll long long ld distPoints(ld x1, ld y1, ld x2, ld y2) { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); } ld calc(ld xm, ld ym, ld rad, ld xNeed, ld yNeed, ld a) { ld x = xm + rad * cos(a); ld y = ym + rad * sin(a); return distPoints(x, y, xNeed, yNeed); } ld solveCircle(ld xm, ld ym, ld rad, ld xNeed, ld yNeed, ld a1, ld a2) { ld l = a1, r = a2; while (r - l >= 0.000000001) { ld m1 = l + (r - l)/3.0; ld m2 = r - (r - l)/3.0; ld f1 = calc(xm, ym, rad, xNeed, yNeed, m1); ld f2 = calc(xm, ym, rad, xNeed, yNeed, m2); if (f1 < f2) r = m2; else if (f1 > f2) l = m1; else { l = m1; } } return calc(xm, ym, rad, xNeed, yNeed, l); } ld solveMid(int x1, int y1, int x2, int y2, int x3, int y3) { ld xm = (ld)(x1 + x2) / 2.0; ld ym = (ld)(y1 + y2) / 2.0; ld r = distPoints(xm, ym, x1, y1); return min({solveCircle(xm, ym, r, x3, y3, 0.0, 90.0), solveCircle(xm, ym, r, x3, y3, 90.0, 180.0), solveCircle(xm, ym, r, x3, y3, 180.0, 270.0), solveCircle(xm, ym, r, x3, y3, 270.0, 360.0) }); } pair t[5]; int main() { for (int i = 1; i <= 3; i++) { cin >> t[i].first >> t[i].second; } ld ans = 1010101010; for (int i = 1; i <= 3; i++) { for (int j = i + 1; j <= 3; j++) { if (i == j) continue; int k = 1; while (k == i || k == j) k++; ans = min(ans, solveMid(t[i].first, t[i].second, t[j].first, t[j].second, t[k].first, t[k].second)); } } cout << fixed << setprecision(9) << ans << '\n'; return 0; } /* 4 0 0 4 -1 -1 */