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

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