Magnetic and quadrupole-moment ratios of the first-excited states in 186W and 182W