while aaa = gets
	
array = aaa.chomp.split("\s")
array.map!{|item| item.to_f}

a = array[0]; b = array[1]; c = array[2]
d = array[3]; e = array[4]; f = array[5]

y = (d*c-a*f)/(d*b-a*e)
x = (c-b*y)/a


print sprintf("%.3f %.3f \n", x,y)

end