The sum of all side lengths and diagonal lengths of a 12-sided polygon can be written in the form $a+b \sqrt{2}+c \sqrt{3}+d \sqrt{6}$, where $a, b, c$, $d$ are positive integers. Find $a+b+c+d$.

The text above is translated into English, preserving the original text's line breaks and format.
Coinciding with the origin, one vertex is at $(12,0)$, and the coordinates of the other vertices are $(12 \cos k x, 12 \sin k x)$, where $x=30^{\circ}$, $k=1,2, \cdots, 11$. The length of the line segment connecting $(12,0)$ and $(12 \cos k x, 12 \sin k x)$ is $24 \sin \frac{k x}{2}$. Therefore, from this,
$$
\begin{array}{l}
S=24\left(\sin 15^{\circ}+\sin 30^{\circ}+\cdots+\sin 165^{\circ}\right) \\
=48\left(\frac{1}{2} \sqrt{6}+\frac{1}{2}+\frac{\sqrt{2}}{2}+\frac{\sqrt{3}}{2}\right)+24 \\
=48+24 \sqrt{2}+24 \sqrt{3}+24 \sqrt{6} .
\end{array}
$$

For the other points, similarly, noting that each line segment is counted twice, therefore,
$$
\begin{array}{l}
\text { Total length }=\frac{1}{2}(12 S) \\
=288+144 \sqrt{2}+144 \sqrt{3}+144 \sqrt{6} . \\
\text { Thus, } a+b+c+d=720 .
\end{array}
$$