import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		double c = sc.nextInt();
		double d = sc.nextInt();
		double e = sc.nextInt();
		double f = sc.nextInt();
		sc.close();

		if (a != b) {
			throw new Exception();
		}

		c /= a;
		d /= a;
		f = (f - e) / a;

		c = c * c / 4;
		d = d * d / 4;
		f = f + c + d;
		System.out.println(Math.sqrt(f));
	}
}