Two magnets A and B are identical and these are arranged as shown in the figure. Their length is negligible in comparison to 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 distance d1 and d2 will be