Spin dynamics in the high-Tc system YBa2Cu3O6+x