a,b,c,d,e,f = map(int, input().split()) r2 = f - e r2 += c * c / a / 4.0 r2 += d * d / b / 4.0 r2 /= abs(a) print(r2 ** 0.5)