4. Points $P$ and $Q$ are the midpoints of arcs $K L$ and $L M$ of the circumcircle of triangle $K L M$, and $L S$ is the angle bisector of this triangle. It turns out that $\angle K L M = 2 \angle K M L$ and $\angle P S Q = 90^{\circ}$. Find the angles of triangle $K L M$
Answer. $\angle L=90^{\circ}, \angle K=\angle M=45^{\circ}$.

Solution. By the condition $\angle M=\frac{\angle L}{2}=\angle S L M$, i.e., triangle $L S M$ is isosceles: $L S = M S$. In addition, $L Q = Q M$, so triangles $L S Q$ and $M S Q$ are equal by three sides, and $S Q$ is the bisector of angle $L S M$. By the condition, line $S P$ is perpendicular to this bisector, so $S P$ is the bisector of angle $L S K$. Now consider triangles $P K S$ and $P L S$. They have a common side $S P$, equal sides $K P = L P$, and equal angles $K S P$ and $L P S$. Unfortunately, these angles are not between the equal sides, so the first criterion for congruence is not applicable. However, this means that angles $P K S$ and $P L S$ are either equal or supplementary to $180^{\circ}$. We can explain this using the Law of Sines in triangles $P K S$ and $P L S$:

$$
\sin \angle P K S = P S \cdot \frac{\sin \angle P K S}{K P} = P S \cdot \frac{\sin \angle L S P}{L P} = \sin \angle P L S.
$$

In the second case, quadrilateral $K P L S$ would be cyclic, which is impossible: point $S$ does not lie on the circle passing through $K, L, P$. Therefore, triangles $P K S$ and $P L S$ are indeed congruent and $K S = M S$.

Thus, $K S = L S = M S$, in other words, the median of triangle $K L M$ is equal to half the side $K M$. This means the triangle is right-angled. And since the median $L S$ coincides with the bisector, it is also isosceles.

Comment. Correct solution - 20 points. There is a gap in the justification - 15 points. Some useful relationships are proven - 5 points. The solution is started but the progress is insignificant - 1 point. The solution is incorrect or absent - 0 points.