Let $S O$ be the height of the pyramid, and $K, L, M$, and $N$ be the bases of the perpendiculars dropped from point $O$ to the sides $A B, B C, C D$, and $A D$ of the base (Fig.1). By the theorem of three perpendiculars, $S K \perp A B, S L \perp B C, S M \perp C D$, and $S N \perp A D$. The right triangles $S O K, S O L, S O M$, and $S O N$ are equal by the leg and hypotenuse, so $O K=O L=O M=O N$, which means $O$ is the center of the circle inscribed in the quadrilateral $A B C D$ (point $O$ lies inside the quadrilateral $A B C D$). Let $C D=x, A D=y$ (Fig.2). By the property of the inscribed quadrilateral, $A B+C D=A D+B C$, i.e., $2+x=y+6$. On the other hand, using the cosine theorem in triangles $A D C$ and $A B C$, we find that

$$
A C 2=C D 2+A D 2-2 C D \cdot A D \cos 120^{\circ}, A C 2=A B 2+B C 2-2 A B \cdot B C \cos 60^{\circ},
$$

from which $x 2+y 2+x y=4+36-12$. From the system

$$
\left\{\begin{array}{l}
x^{2}+y^{2}+x y=28 \\
x=y+4
\end{array}\right.
$$

we find that $C D=x=2 \sqrt{2}+2, A D=y=2 \sqrt{2}-2$. Let $r$ be the radius of the inscribed circle of the quadrilateral $A B C D$, and $p$ be the semiperimeter of the quadrilateral. Then $S_{A B C D}=p r$, and since

$$
\begin{gathered}
S_{A B C D}=S_{\triangle A B C}+S_{\triangle A D C}=\frac{1}{2} A B \cdot B C \sin 60^{\circ}+\frac{1}{2} A D \cdot D C \sin 120^{\circ}= \\
=\frac{1}{2}(A B \cdot B C+A D \cdot D C) \cdot \frac{\sqrt{3}}{2}=\frac{\sqrt{3}}{4}(2 \cdot 6+(2 \sqrt{2}-2)(2 \sqrt{2}+2))= \\
=\frac{\sqrt{3}}{4}(12+8-4)=4 \sqrt{3}
\end{gathered}
$$

And

$$
p=\frac{1}{2}(2+6+(2 \sqrt{2}+2)+(2 \sqrt{2}-2)=4+2 \sqrt{2}
$$

then

![](https://cdn.mathpix.com/cropped/2024_05_06_b86fbfb53af157d03a0ag-24.jpg?height=115&width=658&top_left_y=800&top_left_x=700)

From the right triangle $S O K$, we find that

$$
S O=\sqrt{S K^{2}-O K^{2}}=\sqrt{2-(\sqrt{3}(2-\sqrt{2}))^{2}}=2 \sqrt{3 \sqrt{2}-4}
$$

## Answer

$2 \sqrt{3 \sqrt{2}-4}$
4 [Cyclic Quadrilaterals]

In a quadrilateral pyramid $SABCD$, the heights of the lateral faces dropped from the pyramid's vertex $S$ are $\sqrt{2}$. It is known that $AB=2$, $BC=6$, $\angle ABC=\frac{\pi}{3}$, $\angle ADC=\frac{2\pi}{3}$. Find the height of the pyramid if its base lies inside the quadrilateral $ABCD$.