Two magnets A and B are identical and these are arranged as shown in the figure. Their length is negligible in comparison with the separation between them. 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 :