Permanent magnet losses magnetism even if they are in the field of each other ,,no matter what the orientation is. But this process of losing magnetism takes years. That is the reason why the permanent magnet kept in pairs joined with iron strip in general physics lab. This is how we can protect magnet from earth's magnetic field and field of other magnets.