STDIN.each do |value|
	a,b,c,d,e,f = value.split.map(&:to_i)
	x = ((e*c-b*f)*1.0/(a*e-b*d)*1000).round/1000.0
	y = ((a*f-d*c)*1.0/(a*e-b*d)*1000).round/1000.0
	puts sprintf("%.3f %.3f", x.to_f, y.to_f)
end