data = Array.new()
i = 0
x = Array.new()
y = Array.new()
while true
	data[i] = gets
	break if data[i] == nil
	data[i] = data[i].split(" ")
	a = data[i][0].to_f
	b = data[i][1].to_f
	c = data[i][2].to_f
	d = data[i][3].to_f
	e = data[i][4].to_f
	f = data[i][5].to_f
	y[i] = (((c * (d / a)) - f) / (((d / a) * b) - e)).round(3)
	x[i] = ((c - b * y[i]) / a).round(3)
	i += 1
end
(x.size).times do |i|
	puts "#{sprintf("%.3f",x[i])} #{sprintf("%.3f",y[i])}"
end