Two similar bar magnets P and Q