data = []

while data = gets

	data = data.split(nil)
	data.map!{|n| n.to_f}

	x = (data[2] * data[4] - data[1] * data[5]) / (data[0] * data[4] - data[1] * data[3])
	y = (data[2] * data[3] - data[0] * data[5]) / (data[1] * data[3] - data[0] * data[4])

	puts printf("%.3f %.3f", x + 0, y + 0)
end