Two short bar magnets A and B are identical and these are arranged as shown in the figure. A magnetic needle is placed between the magnets at point P which gets deflected through an angle θ under the influence of magnets. The ratio of distances d1 and d2 will be.