Dear student,
Break each bar in half. The two magnet halves will have strong forces between them which will change sign if you turn one piece 180°. The two iron halves won't have strong forces. A magnet half and an iron half will have fairly strong forces which will not change sign if you turn one by 180°. Unfortunately this is a somewhat destructive test.
Regards