x,y,z = float(input()), float(input()), float(input())
a = (y*x)/(z+x)
b = (z*y)-(x*z)
print("a =",a)
print("b =",b)
x,y,z = float(input()), float(input()), float(input())
a = (y*x)/(z+x)
b = (z*y)-(x*z)
print("a =",a)
print("b =",b)