Problem 2. On the sides of a square with side 1, points $K$, $L$, $M$, and $N$ are marked such that segment $K M$ is parallel to two of the square's sides, and segment $L N$ is parallel to the other two sides. Segment $K L$ cuts off a triangle from the square with a perimeter of 1. What is the area of the triangle cut off from the square by segment $M N$?
Solution: We will prove that the sought area is equal to $\frac{1}{4}$. Let the legs of the triangle cut off by the segment $K L$ be equal to $a$ and $b$, and the hypotenuse be equal to $c$ (see the diagram). By the condition $c=1-a-b$. Squaring this equation and applying the Pythagorean theorem, we get

![](https://cdn.mathpix.com/cropped/2024_06_03_62c72dea8e282f2d2f19g-1.jpg?height=391&width=414&top_left_y=1849&top_left_x=1232)

$$
\begin{aligned}
c^{2} & =(1-a-b)^{2} \\
a^{2}+b^{2} & =1+a^{2}+b^{2}+2 a b-2 a-2 b \\
-1 & =2 a b-2 a-2 b
\end{aligned}
$$

Then the area of the triangle cut off by the segment $M N$ from the square is equal to

$$
S=\frac{1}{2}(1-a)(1-b)=\frac{1}{2}(1+a b-a-b)=\frac{1}{2}\left(1-\frac{1}{2}\right)=\frac{1}{4}
$$