#
answer = Array.new

while linebuf = $stdin.gets
		line = linebuf.split( /\s/ )
		line.map!{ |n| n.to_f }
		a = line[ 0 ]; b = line[ 1 ]; c = line[ 2 ] 
		d = line[ 3 ]; e = line[ 4 ]; f = line[ 5 ] 

		di = a * e - b * d
		x1 = e * c - b * f 
		x2 = f * a - c * d
		u1 = x1 / di
		u2 = x2 / di
		answer << [u1,u2]
		
end
answer.each{ |n|
	s1 = sprintf( "%.03f", n[0] )
	s1 = "0.000" if s1 == "-0.000"
	s2 = sprintf( "%.03f", n[1] )
	s2 = "0.000" if s1 == "-0.000"
	printf( "%s %s\n", s1, s2 )
}
