import sys input=sys.stdin.readline def I(): return int(input()) def MI(): return map(int, input().split()) def LI(): return list(map(int, input().split())) def main(): mod=10**9+7 a,b,c,d,e,f=MI() r2=(f-e + (c*c)/(4*a) + (d*d)/(4*b))/a print(r2**0.5) main()