Two strong bar magnets A and B are placed on a horizontal table such that the axis of B intersects A at mid-point as shown in figure. B is fixed while A is free to move. There are no magnetic fields except those due to A and B. Then A will

(a) rotate but not move towards or away from B
(b) rotate and move towards B
(c) move towards B and not rotate
(d) rotate and move away from B