Answer
Yes.
Work Step by Step
We can test that by turning one of them around the other to see if any parts repeal each other.
If at any position and in any direction, both are attracted to each other, then one of them is the magnet and the other is just a magnet metal.
And if one of them is reeling the other at some point, then both of them are magnets.