North and south poles of two magnets attract each other, while two north poles or two south poles repel each other.
(North and south poles of two magnets; attract; each other) (two north poles or two south poles; repel; each other)
North and south poles of two magnets two north poles or two south poles
attract repel
each other
each other