102. Find the sum of the squares of the distances from the points of tangency of the inscribed circle with the sides of a given triangle to the center of the circumscribed circle, if the radius of the inscribed circle is $r$, and the radius of the circumscribed circle is $R$.
102. Let $O$ be the center of the circumcircle of $\triangle ABC$, $B_{1}$ the midpoint of $AC$, and $N$ the point of tangency of the incircle with $AC$; then, if $|BC|=a,|AC|=b,|AB|=c$, we have $|AN|=p-a$, $|CN|=p-c$ (see problem 18, section I) $|ON^{2}|=|OB_{1}^{2}+B_{1}N^{2}=$

\[
\begin{gathered}
=\left(\left.{ }^{(} AO\right|^{2}-\mid AB_{1}{ }^{2}\right)+\left\lvert\, B_{1}N^{2}=R^{2}-\frac{b^{2}}{4}+\left(p-a-\frac{b}{2}\right)^{2}=\right. \\
=R^{2}+(p-a)(p-a-b)=R^{2}-(p-a)(p-c)
\end{gathered}
\]

Similarly, by determining the squares of the distances to the other points of tangency and summing them, we find that the desired sum is

\[
3 R^{2}-(p-a)(p-c)-(p-a)(p-b)-(p-b)(p-c)=3 R^{2}-M
\]

Using the following formulas for the area of the triangle: Heron's formula and the formulas $S=pr, S=\frac{abc}{4R}$, we get

\[
\left\{\begin{array} { l } 
{ \sqrt { \overline { p ( p - a ) ( p - b ) ( p - c ) } } = p r } \\
{ p r = \frac { a b c } { 4 R } }
\end{array} \Rightarrow \left\{\begin{array}{l}
r^{2}=\frac{(p-a)(p-b)(p-c)}{p} \\
4 R r=\frac{a b c}{p}
\end{array}\right.\right.
\]

Adding the last equalities and using the identity

\[
\begin{aligned}
& (p-a)(p-b)(p-c)+abc= \\
& \quad=p[(p-a)(p-b)+(p-b)(p-c)+(p-c)(p-a)]=p M
\end{aligned}
\]

we find that $M=4 R r+r^{2}$.

Answer: $3 R^{2}-4 R r-r^{2}$.