answered
We can identify poles of a magnet be keeping it close to the compass and see whether the side of a magnet is repelled by the north pole of the compass or attracted.If attracted then it is the south pole of magnet and if repelled it is the north pole of the magnet