if __FILE__ == $0
	while line = gets
		a,b,c,d,e,f = line.chomp!.split(" ").map(&:to_i)
		y = ((a.to_f * f) - (c.to_f * d)) / ((a.to_f * e) - (b.to_f * d))
		x = (c.to_f / a) - ((b.to_f / a) * y)
		print(x," ",y,"\n")
	end
end