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