Distinguish between a bar magnet and a solenoid.

22