while data = gets do
	if data == nil
		break
	end
	
	nums = data.split().map(&:to_f)
	a = 1/(nums[0]*nums[4]-nums[1]*nums[3])
	x = (nums[4]*nums[2]-nums[1]*nums[5])*a
	y = (nums[0]*nums[5]-nums[3]*nums[2])*a
	
	puts sprintf("%.3f %.3f", x+0.0,y+0.0)
end