while get = gets do
	a,b,c,d,e,f = get.chomp.split(" ").map(&:to_i)
	x=((c*e-b*f)*1.0/(a*e-b*d)*1000.0).round/1000.0
	y=((f*a-c*d)*1.0/(a*e-d*b)*1000.0).round/1000.0
	puts sprintf( "%.3f ", x )+sprintf( "%.3f", y )
end