Let \triangle A B C have A B=14, B C=30, A C=40 and \triangle A B^{\prime} C^{\prime} with A B^{\prime}=7 \sqrt{6}, B^{\prime} C^{\prime}=15 \sqrt{6}, A C^{\prime}=20 \sqrt{6} such that \angle B A B^{\prime}=\frac{5 \pi}{12}. The lines B B^{\prime} and C C^{\prime} intersect at point D. Let O be the circumcenter of \triangle B C D, and let O^{\prime} be the circumcenter of \triangle B^{\prime} C^{\prime} D. Then the length of segment O O^{\prime} can be expressed as \frac{a+b \sqrt{c}}{d}, where a, b, c, and d are positive integers such that a and d are relatively prime, and c is not divisible by the square of any prime. Find a+b+c+d.