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