The two magnet pairs $N_2$ and $S_2$, $N_1$ and $S_1$ attract each other respectively which causes the wheel$_1$ to move in the clockwise direction and wheel$_2$ to move in the anti-clockwise direction. The rest of the magnets does not produce any effect because they are shielded by a magnetic screen. The continuous rotation of wheels can be used to run a turbine which can produce energy.so energy can be produced.
It's an attractive idea, but there isn't really such a thing as a "magnetic screen". If you put soft iron plates in the places where you show these screens in your diagram then the passing magnets would in general induce opposite magnetic fields in the iron plates, which would attract them to the iron plates. Magnets in the positions N7 and N8 (and S7 and S8) would be moving away from the induced magnetic fields in the iron plates, which would tend to hinder their rotation.
Where the iron plates join near N4 / S3, conflicting south and north magnetic fields would be induced. These would pretty much cancel each other out. So the screens in the central location won't attract the magnets that are moving towards them, N2 and S2. It would be tricky to do all the arithmetic involved, but the sad news is you would end up with no net force on the two rotating wheels.
If you could invent a true magnetic shield then the magnetic lines between N and S magnets would have to bend around the sharp edge where the two shields meet once they pass this point. The magnetic lines between them would get stretched longer as their effective separation grows. Stretching magnetic lines takes work. Sadly, there is no free lunch.