China says both sides will lose from conflict with US