Ganeshan set up an experiment using two bar magnets one of which is marked N (North pole) and S (South pole) as shown in the figure. He noticed that the upper magnet is suspended in air and is getting repelled.
Identify X and Y poles of the upper magnet.
X is the north pole, Y is the south pole
Like poles of magnets repel and unlike poles attract. Since the upper magnet gets repelled while being suspended in the air, we can conclude that X is the north pole and Y is the south pole in the upper magnet.