Answer : X
Explanation : X pair will repel each other because like pole always repels each other and unlike pole attract to each other.
We know a magnet is an object which produces a magnetic field. This is the property of a magnet that like poles of a magnet repel each other and unlike pole of a magnet attract to each other.
Hence, X is the answer.