a,b,c,d,e,f = map(int,input().split()) ans = (f-e+(c**2/(4*a)+d**2/(4*b)))/a print(ans**0.5)