//Problem "Tri"
//8th Internet Olympiad, season 2007-2008
//Problem Author:  Fedor Tsarev, tsarev@rain.ifmo.ru
//Solution Author: Vladimir Ulyantsev, ulyantsev@rain.ifmo.ru

import java.io.*;
import java.util.*;
import java.math.*;

public class tri_vu {

 	static double get (double a, double b, double c) {
 		double p = (a + b + c) / 2;  //!
 		return 2 * Math.sqrt(p * (p - a) * (p - b) * (p - c)) / a; //nado podumat'
 	}

 	static double dist (int x1, int y1, int x2, int y2) {
 		return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
 	}

	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(new File("tri.in"));
		PrintWriter out = new PrintWriter(new File("tri.out")); //System.out

		int x1 = in.nextInt();
		int y1 = in.nextInt();
		int x2 = in.nextInt();
		int y2 = in.nextInt();
		int x3 = in.nextInt();
		int y3 = in.nextInt();
		int xc = in.nextInt();
		int yc = in.nextInt();

		double ans = 0;
		double h1 = get(dist(x1, y1, x2, y2), dist(x1, y1, xc, yc), dist(x2, y2, xc, yc));
		double h2 = get(dist(x1, y1, x3, y3), dist(x1, y1, xc, yc), dist(x3, y3, xc, yc));
		double h3 = get(dist(x3, y3, x2, y2), dist(x3, y3, xc, yc), dist(x2, y2, xc, yc));

		out.println(Math.min(Math.min(h1, h2), h3));

		in.close();
		out.close();
	}

}