Detection of a change in the North-South ratio of count rates of particles of high-energy cosmic rays during a change in the polarity of the magnetic field of the Sun