xrr = []
yrr = []
i = 0
while num = gets
	if num.to_i == 0
		break
	end
	a,b,c,d,e,f = num.split.map(&:to_f)
	xrr[i] = 1000.0 * (b*f - c*e)/(b*d - a*e)
	yrr[i] = 1000.0 * (a*f - c*d)/(a*e - b*d)
	i += 1
end

for k in 0..xrr.size-1 do
	print xrr[k].round.to_f * 0.001
	print " "
	print yrr[k].round.to_f * 0.001
	puts ""
end